HomeSearch

VB.NET Pages

Dot Net Perls has example pages for many languages, with explanations and code side by side (for easy understanding).
C#F#GoJavaJavaScriptPythonRubyScalaSwiftVB.NETWPF

Array.

Create string and integer arrays with initializers. Get elements, and use Length and For Each loops.VB.NET Array Examples, String Arrays

List.

Use the List type: add, remove and get elements from Lists. Lists resize when space is needed.VB.NET List Examples

Class.

Review Class types their syntax. Use the MyClass keyword and Friend classes.VB.NET Class Examples: MyClass, Friend Classes

Concat.

Concat strings with the plus-operator or the String.Concat Function.VB.NET String.Concat Examples

Console.

Use the Console: call the Console.Write, WriteLine and ReadLine subs.VB.NET Console.Write, WriteLine, ReadLine Examples

DataTable.

Use DataTable to store data in memory from databases and other data sources.VB.NET DataTable Examples

DateTime format.

Use DateTime format patterns. Call the ToString method with a format string.VB.NET DateTime Format

DateTime.

Use DateTime in programs. Access DateTime constructors and properties.VB.NET DateTime Examples

Dictionary.

Use Dictionary and add keys and values. Call ContainsKey and TryGetValue to look up elements.VB.NET Dictionary Examples

Enum.

Use Enum values to stores named and magic constants. Use if-statements with enums.VB.NET Enum Examples

File.

Handle files: in the System.IO namespace, use StreamReader and StreamWriter.VB.NET File Handling

For, For Each.

Use For to increment or decrement with a Step. With For Each, enumerate an array.VB.NET For Loop Examples (For Each)

If Then.

Use the If Then statement. See examples for the If, ElseIf, Else and End keywords.VB.NET If Then, ElseIf, Else Examples

IndexOf.

Call the IndexOf Function. IndexOf returns the index of a substring as an Integer.VB.NET IndexOf Function

Integer.Parse.

Use the Integer.Parse and TryParse Functions to convert Strings to Integers.VB.NET Integer.Parse: Convert String to Integer

Keywords.

See the keywords in VB.NET. Keywords are used in declarations and statements.VB.NET Keywords

Lambdas.

Create lambda expressions and pass them to other methods. Use the Function keyword.VB.NET Lambda Expressions

LINQ.

Use LINQ, a set of extensions to the language that enable queries.VB.NET LINQ Examples: Queries, Extensions

Nothing.

Use Nothing and IsNothing. A reference that points to nothing can cause an Exception.VB.NET Nothing, IsNothing (Null)

Process.

Use the Process.Start Function. Open Microsoft Word, web browsers and text files.VB.NET Process Examples (Process.Start)

Property.

Use the Property keyword to improve program syntax. A property gets and sets values.VB.NET Property Examples (Get, Set)

Random.

Use the Random class. Random has a Next Function and is often used as a field.VB.NET Random Numbers

Regex.

Use Regex from System.Text.RegularExpressions. Match Strings based on patterns.VB.NET Regex.Match Examples: Regular Expressions

Replace.

Call the Replace Function. Change all instances of one substring to another and get a new String.VB.NET Replace String Examples

Select Case.

Use the Select Case statement with integers, Chars and Strings. See a nested Select Case.VB.NET Select Case Examples

Sort.

See examples for sorting. Use the Array.Sort and List.Sort Functions to sort arrays and Lists.VB.NET Sort Examples: Arrays and Lists

Split.

Separate strings on a value with the String.Split function. Use Char and String delimiters.VB.NET Split String Examples

String.

Use the String type: create, search and modify strings. Test string functions.VB.NET String

String.Format.

Call the String.Format Function with patterns. Insert numbers and values into strings.VB.NET String.Format Examples: String and Integer

StringBuilder.

Use the StringBuilder class to improve performance with String appends.VB.NET StringBuilder Examples

Subs, functions.

Use the Sub keyword for a subroutine. See the syntax for parameters and comments.VB.NET Sub Procedure Examples

Substring.

Use the Substring Function to get parts of strings. Review the arguments to Substring.VB.NET Substring Examples

ToLower, ToUpper.

Use the ToLower and ToUpper Functions on strings to change the cases of letters.VB.NET ToLower and ToUpper: String Uppercase, Lowercase

TryCast.

Use TryCast and DirectCast. Handle invalid casts and view casting syntax.VB.NET Cast: TryCast, DirectCast Examples

While, Do While.

Use the Do While and While loops. Keep looping as long as a condition remains True.VB.NET Do While Loop Examples (While)
Home
Dot Net Perls
© 2007-2019 Sam Allen. All rights reserved. Written by Sam Allen, info@dotnetperls.com.