Lưu ý
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử đăng nhập hoặc thay đổi thư mục.
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử thay đổi thư mục.
Use the Distinct operator to eliminate duplicate elements from a sequence.
Example
The following example uses Distinct to select a sequence of the unique cities that have customers.
IQueryable<String> cityQuery =
(from cust in db.Customers
select cust.City).Distinct();
foreach (String cityString in cityQuery)
{
Console.WriteLine(cityString);
}
Dim cityQuery = _
(From cust In db.Customers _
Select cust.City).Distinct()
For Each cityString In cityQuery
Console.WriteLine(cityString)
Next