/
aprogrammer
/
dotnet-docs
Обзор
Документация
Войти
/
aprogrammer
/
dotnet-docs
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
samples/snippets/visualbasic/VS_Snippets_VBCSharp/CsLINQSetOps/VB/setops.vb
28 строк
735 B
Next Turn
Format codes based on .editorconfig, Part 20 (#19005)
19 июн 2020, 16:57
Не верифицирован
19 июн 2020, 16:57
544f978
Код
Авторство
О чём код?
Module Projection Sub Main(ByVal args As String()) Distinct() End Sub Sub Distinct() ' <Snippet1> Dim classGrades = New System.Collections.Generic.List(Of Integer) From {63, 68, 71, 75, 68, 92, 75} Dim distinctQuery = From grade In classGrades Select grade Distinct Dim sb As New System.Text.StringBuilder("The distinct grades are: ") For Each number As Integer In distinctQuery sb.Append(number & " ") Next ' Display the results. MsgBox(sb.ToString()) ' This code produces the following output: ' The distinct grades are: 63 68 71 75 92 ' </Snippet1> End Sub End Module