CS-Notes/docs/_style/prism-master/examples/prism-vbnet.html

16 lines
446 B
Java
Raw Normal View History

2018-12-19 14:09:39 +08:00
<h2>Comments</h2>
<pre><code>!foobar
REM foobar
'foobar</code></pre>
<h2>Example</h2>
<pre><code>Public Function findValue(ByVal arr() As Double,
ByVal searchValue As Double) As Double
Dim i As Integer = 0
While i <= UBound(arr) AndAlso arr(i) <> searchValue
' If i is greater than UBound(arr), searchValue is not checked.
i += 1
End While
If i > UBound(arr) Then i = -1
Return i
End Function</code></pre>