Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <pre><code>VB C# UBound() = yourArray.GetUpperBound(0) or yourArray.Length for one-dimesional arrays LBound() = yourArray.GetLowerBound(0) IsNothing() = Object.ReferenceEquals(obj,null) Chr() = Convert.ToChar() Len() = "string".Length UCase() = "string".ToUpper() LCase() = "string".ToLower() Left() = "string".Substring(0, length) Right() = "string".Substring("string".Length - desiredLength) RTrim() = "string".TrimEnd() LTrim() = "string".TrimStart() Trim() = "string".Trim() Mid() = "string".Substring(start, length) Replace() = "string".Replace() Split() = "string".Split() Join() = String.Join() MsgBox() = MessageBox.Show() IIF() = (boolean_condition ? "true" : "false") </code></pre> <p><strong>Notes</strong></p> <ul> <li><code>yourArray.GetUpperBound(0)</code> vs <code>yourArray.Length</code>: if the array is zero-length, GetUpperBound will return -1, while Length will return 0. <code>UBound()</code> in VB.NET will return -1 for zero-length arrays.</li> <li>The VB string functions uses a one based index, while the .NET method uses a zero based index. I.e. <code>Mid("asdf",2,2)</code> corresponds to <code>"asdf".SubString(1,2)</code>.</li> <li><code>?</code> is not the exact equivalent of <code>IIf</code> because <code>IIf</code> always evaluates <em>both</em> arguments, and <code>?</code> only evaluates the one it needs. This could matter if there are side effects of the evaluation ~ <em>shudder!</em></li> <li>The Many classic VB String functions, including <code>Len()</code>, <code>UCase()</code>, <code>LCase()</code>, <code>Right()</code>, <code>RTrim()</code>, and <code>Trim()</code>, will treat an argument of <code>Nothing</code> (<code>Null</code> in c#) as being equivalent to a zero-length string. Running string methods on <code>Nothing</code> will, of course, throw an exception.</li> <li>You can also pass <code>Nothing</code> to the classic VB <code>Mid()</code> and <code>Replace()</code> functions. Instead of throwing an exception, these will return <code>Nothing</code>.</li> </ul>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload