Click here to Skip to main content
15,918,742 members
Home / Discussions / C#
   

C#

 
GeneralRe: simple PAssword Policy Pin
THE SK16-Dec-09 9:55
THE SK16-Dec-09 9:55 
AnswerRe: simple PAssword Policy Pin
#realJSOP16-Dec-09 10:03
professional#realJSOP16-Dec-09 10:03 
GeneralRe: simple PAssword Policy Pin
Eddy Vluggen16-Dec-09 10:52
professionalEddy Vluggen16-Dec-09 10:52 
QuestionLooking to Learn Programming better Need help please. Pin
Extremeshannon16-Dec-09 8:05
Extremeshannon16-Dec-09 8:05 
AnswerRe: Looking to Learn Programming better Need help please. Pin
OriginalGriff16-Dec-09 8:22
mveOriginalGriff16-Dec-09 8:22 
AnswerRe: Looking to Learn Programming better Need help please. Pin
#realJSOP16-Dec-09 8:59
professional#realJSOP16-Dec-09 8:59 
GeneralRe: Looking to Learn Programming better Need help please. Pin
Pete O'Hanlon16-Dec-09 9:02
mvePete O'Hanlon16-Dec-09 9:02 
GeneralRe: Looking to Learn Programming better Need help please. Pin
Luc Pattyn16-Dec-09 9:43
sitebuilderLuc Pattyn16-Dec-09 9:43 
GeneralRe: Looking to Learn Programming better Need help please. Pin
PIEBALDconsult16-Dec-09 10:35
mvePIEBALDconsult16-Dec-09 10:35 
GeneralRe: Looking to Learn Programming better Need help please. Pin
Luc Pattyn16-Dec-09 11:02
sitebuilderLuc Pattyn16-Dec-09 11:02 
GeneralRe: Looking to Learn Programming better Need help please. Pin
PIEBALDconsult16-Dec-09 11:50
mvePIEBALDconsult16-Dec-09 11:50 
AnswerRe: Looking to Learn Programming better Need help please. Pin
BillWoodruff16-Dec-09 18:17
professionalBillWoodruff16-Dec-09 18:17 
QuestionContinued Values Collection/List/Dictionary [modified] Pin
Som Shekhar16-Dec-09 7:48
Som Shekhar16-Dec-09 7:48 
AnswerRe: Continued Values Collection/List/Dictionary Pin
#realJSOP16-Dec-09 9:04
professional#realJSOP16-Dec-09 9:04 
GeneralRe: Continued Values Collection/List/Dictionary Pin
Som Shekhar16-Dec-09 19:16
Som Shekhar16-Dec-09 19:16 
AnswerRe: Continued Values Collection/List/Dictionary Pin
Eddy Vluggen16-Dec-09 10:19
professionalEddy Vluggen16-Dec-09 10:19 
Value1, value2 and value3 are distinct entities that you want to track? A dictionary consists of a value and a key. The key would be your index-column, the value could be a struct that holds the three columns;
System.Collections.Generic.Dictionary<int, MyValues> myListOfValues;

struct MyValues
{
   int value1;
   int value2;
   int value3;
}
You could consider the generic list as your datatable, and the struct as a single row in that table. Now you can add values to your dictionary;
MyValues oneRow = new MyValues();
oneRow.value1 = 100;
oneRow.value2 = 200;
oneRow.value3 = 300;
myListOfValues.Add(1, oneRow);
Now, if you want the recreate those values for index 3, you would have to search in the list for the first non-empty value for the column value2.

If speed is important, then I'd create one row outside of that list, just to mirror the current values. That wouldn't help if you need the values from the middle of the index, you'd still have to walk the list for that.

How many records will be in that list? It might just be worth to store copies of the latest value, instead of looking for them.

I are Troll Suspicious | :suss:

GeneralRe: Continued Values Collection/List/Dictionary Pin
Som Shekhar16-Dec-09 19:15
Som Shekhar16-Dec-09 19:15 
GeneralRe: Continued Values Collection/List/Dictionary Pin
Eddy Vluggen16-Dec-09 21:13
professionalEddy Vluggen16-Dec-09 21:13 
GeneralRe: Continued Values Collection/List/Dictionary Pin
Som Shekhar16-Dec-09 21:28
Som Shekhar16-Dec-09 21:28 
GeneralRe: Continued Values Collection/List/Dictionary Pin
Eddy Vluggen16-Dec-09 21:34
professionalEddy Vluggen16-Dec-09 21:34 
GeneralRe: Continued Values Collection/List/Dictionary Pin
Som Shekhar16-Dec-09 21:39
Som Shekhar16-Dec-09 21:39 
GeneralRe: Continued Values Collection/List/Dictionary Pin
Eddy Vluggen16-Dec-09 21:53
professionalEddy Vluggen16-Dec-09 21:53 
GeneralRe: Continued Values Collection/List/Dictionary Pin
Som Shekhar16-Dec-09 21:56
Som Shekhar16-Dec-09 21:56 
GeneralRe: Continued Values Collection/List/Dictionary Pin
Eddy Vluggen17-Dec-09 1:53
professionalEddy Vluggen17-Dec-09 1:53 
GeneralRe: Continued Values Collection/List/Dictionary Pin
Som Shekhar17-Dec-09 2:40
Som Shekhar17-Dec-09 2:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.