Hi,
I am beginner in c#. I have List of EnumeratedValues, I need to get the key and assign to some other string. Can anybody help me on this.
Thanks,
Genith
Printable View
Hi,
I am beginner in c#. I have List of EnumeratedValues, I need to get the key and assign to some other string. Can anybody help me on this.
Thanks,
Genith
Can you post some code on what you have?
Hi Arjay,
Here is my EnumeratedValue
public class EnumeratedValue
{
public string ParentKey { get; set; }
public string Value { get; set; }
public string Name { get; set; }
public string Description { get; set; }
public string Type { get; set; }
public string Key { get; set; }
public string ParentType { get; set; }
}
I am already using Name from Store proc.
public List<EnumeratedValue> AvailabeNames
{
}
I am assigning for this AvailabeNames in service. I need to access key form AvailabeNames.
Thanks
If you want to find an AvailableName entry by a key, then you may want to use a Dictionary<> collection instead of a List<>.Code:foreach( var availableName in AvailableNames)
{
var key availableName.Key;
}