我想在Resource.Resx文件中输入10万条记录,并在C#的窗体中访问它。

huangapple go评论64阅读模式
英文:

I want to Enter 100000 Records in Resource.Resx File and Access it Form Window Form in C#

问题

I want to Enter 100000 Record in Resources File and Access it From Window Form.

英文:

Although I have Accesed it.. but only upto 60000 Records can Access. whenever I Enterd 70000 Record ,it is Displaying Exception in Loading Page..
below-

System.TypeLoadException: 'Type 'WindowsFormsApp1.Properties.Resources' from assembly 'WindowsFormsApp1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' contains more methods than the current implementation allows.'

I want to Enter 100000 Record in Resources File and Access it From Window Form

答案1

得分: 1

这是滥用资源系统。它并不旨在取代数据库或保存如此多的信息 - 它的设计初衷是为了实现轻松配置,或者用于多语言应用,而不应该强制你重新编译以添加一种语言。

不要使用资源,尝试使用其他方式 - 比如 JSON 配置文件,数据库,或者根据你的需求可能是图像目录。

英文:

This is abusing the resources system. It's not meant to replace a database or hold this much information - its designed to enable easy configuration, or multi-linguale applications where adding a language shouldn't force you to recompile.

Instead of using resources, try using something else - A JSON configuration file, a database, perhaps images directory - depending on your needs.

huangapple
  • 本文由 发表于 2023年2月26日 19:38:23
  • 转载请务必保留本文链接:https://go.coder-hub.com/75571712.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定