Click here to Skip to main content
15,896,118 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
here LicenseId is Integer..

var q = (from b in salesContext.SL_License where b.OrderId == 254857 select new { b.LicenseId}).ToList();
Posted
Comments
DamithSL 3-May-14 0:31am    
you want to concatenate LicenseId values? can you give sample output?

you can use string.Join
C#
var q = (.....).ToList();
var res = string.Join(",",q);
 
Share this answer
 
Comments
NithyaGopu 3-May-14 3:24am    
thank yu
LINQ has an Aggregate extension method that can be used to concatenate strings.
C#
string[] array = { "a", "b"};
    var output = array.Aggregate((a, b) => a + b);


Here are some more examples -
C# Aggregate method[^]
More on the Aggregate method[^]
 
Share this answer
 
Comments
NithyaGopu 3-May-14 3:24am    
thank yu
Abhinav S 3-May-14 3:44am    
Welcome. Mark as answered if it helped.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900