c# - What should be the approach for implementing data storing -


i having variables

page no

position

url

text

word

i having above different words i.e word 1 may have

page no =1

position =10

url abc.com

text realtext

word real

and on have save them in list.

first thought of declaring list each thought not idea.

is there way save them can access data according url?

i not have use database. these lists temporary , populated each time program starts.

create class variables want properties:

class storage {      public string url     {         get;        set;      }      //etc.  } 

edit: can use class store information:

storage mystorage = new storage(); mystorage.url = "www.example.com"; //etc 

then can store each object created in generic dictionary:

dictionary<string, storage> dict = new dictionary<string, storage>(); dict.add(mystorage.url, mystorage); 

edit: , can retrieve each object url:

storage fromdict = dict["www.example.com"]; 

Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -