Horje
c# select first value from list Code Example
c# select first value from list
lstComp.First();
//You can also use FirstOrDefault() just in case lstComp does not contain any items.

//To get the Component Value:
var firstElement = lstComp.First().ComponentValue("Dep");

//This would assume there is an element in lstComp. An alternative and safer way would be...
var firstOrDefault = lstComp.FirstOrDefault();
if (firstOrDefault != null) 
{
    var firstComponentValue = firstOrDefault.ComponentValue("Dep");
}




Csharp

Related
httpclient soap request c# Code Example httpclient soap request c# Code Example
c# run loop x times Code Example c# run loop x times Code Example
add row count devepxress report Code Example add row count devepxress report Code Example
read excel to object c# Code Example read excel to object c# Code Example
null coalescing operator c# Code Example null coalescing operator c# Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
9