/
aprogrammer
/
dotnet-docs
Обзор
Документация
Войти
/
aprogrammer
/
dotnet-docs
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
samples/snippets/visualbasic/getting-started/ref-return.vb
29 строк
958 B
Andy De George
Move snippets from samples repo to this repo (#17296)
03 мар 2020, 19:23
Не верифицирован
03 мар 2020, 19:23
dbbeda1
Код
Авторство
О чём код?
Module Example Public Sub Main() SimpleMethodCall() Console.WriteLine() ConditionalModification() End Sub Private Sub SimpleMethodCall() ' <Snippet1> Dim sentence As New Sentence("A time to see the world is now.") Dim found = False sentence.FindNext("A", found) = "A good" Console.WriteLine(sentence.GetSentence()) ' The example displays the following output: ' A good time to see the world is now. ' </Snippet1> End Sub Private Sub ConditionalModification() ' <Snippet2> Dim sentence As New Sentence("A time to see the world is now.") Dim found = False sentence.FindNext("A", found) = IIf(found, "A good", sentence.FindNext("B", found)) Console.WriteLine(sentence.GetSentence()) ' The example displays the following output: ' A good time to see the world is now. ' </Snippet2> End Sub End Module