Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to have a LINQ - Query Distinct()

Status
Not open for further replies.

Appuxu

Programmer
Oct 28, 2013
1
0
0
SA
Hi, After a gap, again I entered to Visual C++ 2010. Now my intention is to prepare a LINQ Query to select a distinct value from a datatable

In C# My Query

Code:
var ProjLnkQry = (from P in MyClass1.ProjTbl.AsEnumerable() select P["proj_name"]).Distinct().ToList();
The above query I try to convert it into VIsual C++

Code:
auto DistDepQry=(from v1 in MyGlobalData::ProjectTbl::AsEnumaerable() select v1["depart_name"])->Distinct()->ToList();
But not succeeded.... I found the error like "from" undeclared Identifier

Thanks for the ideas... .
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top