Mangesh barmate

Mangesh barmate

  • NA
  • 118
  • 136.1k

how to get data into dictionary collecion in c#.net?

Jan 29 2013 8:32 AM
 

Hi,

I have a dictionary collection whre i stored name and value.For instance i have 500 records stord in that collection just like below-

Dictionary<string,int> dict=new Dictionary<string,int>();

dict.add("A",1);

dict.add("B",2);

--

dict.add("AAB",500); 

I have a method name GetData(int PageNumber,Dictionary<string,int>() myDictionary)

it takes 2 aurguments.

First i will pass page number,and second i have collection. 

I want to achieve, if i pass page number 1 then dictionary collection maintain only 1-100 key value pair.

If i passed 2 then dictionary collection maintain only 101-200 key value pair.

And keep going such fashion.It means i want to create it dynamic approach.

Any approach is greatly appreciated!


Answers (2)