英文:
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论