<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>C#</title>
        <link>http://geekswithblogs.net/mahesh/category/4917.aspx</link>
        <description>C#</description>
        <language>en-US</language>
        <copyright>Mahesh Singh</copyright>
        <managingEditor>maheshsingh21@yahoo.co.in</managingEditor>
        <generator>Subtext Version 0.0.0.0</generator>
        <item>
            <title>VB.NET and C# Syntax Comparison</title>
            <link>http://geekswithblogs.net/mahesh/archive/2008/01/03/vb.net-and-c-syntax-comparison.aspx</link>
            <description>&lt;style type="text/css"&gt;&lt;![CDATA[
 
table.header { BACKGROUND-COLOR: rgb(230,230,230) }
	.heading { FONT-SIZE: 20px; COLOR: blue; PADDING-TOP: 5px; LETTER-SPACING: 2pt; BACKGROUND-COLOR: rgb(230,230,230) }
	.heading2 { FONT-WEIGHT: bold; FONT-SIZE: 16px; COLOR: black; PADDING-TOP: 5px; LETTER-SPACING: 2pt; BACKGROUND-COLOR: rgb(230,230,230) }
	.comment { COLOR: green; FONT-STYLE: italic }
		]]&gt;&lt;/style&gt;
&lt;h1 style="TEXT-ALIGN: center"&gt;VB.NET and C# Syntax Comparison&lt;/h1&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style="BORDER-RIGHT: rgb(200,200,200) 2px solid; BORDER-TOP: rgb(200,200,200) 2px solid; BORDER-LEFT: rgb(200,200,200) 2px solid; BORDER-BOTTOM: rgb(200,200,200) 2px solid"&gt;
&lt;table id="menutable" cellspacing="1" cellpadding="0" width="600" align="center" border="0"&gt;
    &lt;tbody&gt;
        &lt;tr valign="top"&gt;
            &lt;td width="23%"&gt;&lt;a href="#progstruct"&gt;Program Structure&lt;/a&gt;&lt;br /&gt;
            &lt;a href="#comments"&gt;Comments&lt;/a&gt; &lt;br /&gt;
            &lt;a href="#datatypes"&gt;Data Types&lt;/a&gt; &lt;br /&gt;
            &lt;a href="#constants"&gt;Constants&lt;/a&gt; &lt;br /&gt;
            &lt;a href="#enumerations"&gt;Enumerations&lt;/a&gt; &lt;/td&gt;
            &lt;td width="23%"&gt;&lt;a href="#operators"&gt;Operators&lt;/a&gt;&lt;br /&gt;
            &lt;a href="#choices"&gt;Choices&lt;/a&gt; &lt;br /&gt;
            &lt;a href="#loops"&gt;Loops&lt;/a&gt; &lt;br /&gt;
            &lt;a href="#arrays"&gt;Arrays&lt;/a&gt; &lt;br /&gt;
            &lt;a href="#functions"&gt;Functions&lt;/a&gt; &lt;/td&gt;
            &lt;td width="31%"&gt;&lt;a href="#strings"&gt;Strings&lt;/a&gt; &lt;br /&gt;
            &lt;a href="#exceptionhandling"&gt;Exception Handling&lt;/a&gt;&lt;br /&gt;
            &lt;a href="#namespaces"&gt;Namespaces&lt;/a&gt; &lt;br /&gt;
            &lt;a href="#classesinterfaces"&gt;Classes / Interfaces&lt;/a&gt; &lt;br /&gt;
            &lt;a href="#constructorsdestructors"&gt;Constructors / Destructors&lt;/a&gt; &lt;/td&gt;
            &lt;td width="25%"&gt;&lt;a href="#objects"&gt;Using Objects&lt;/a&gt; &lt;br /&gt;
            &lt;a href="#structs"&gt;Structs&lt;/a&gt;&lt;br /&gt;
            &lt;a href="#properties"&gt;Properties&lt;/a&gt; &lt;br /&gt;
            &lt;a href="#delegatesandevents"&gt;Delegates / Events&lt;/a&gt; &lt;br /&gt;
            &lt;a href="#consoleio"&gt;Console I/O&lt;/a&gt; &lt;br /&gt;
            &lt;a href="#fileio"&gt;File I/O&lt;/a&gt; &lt;/td&gt;
        &lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div style="BORDER-RIGHT: white 2px solid; BORDER-TOP: white 2px solid; BORDER-LEFT: white 2px solid; BORDER-BOTTOM: white 2px solid"&gt;&lt;br /&gt;
&lt;div style="BORDER-RIGHT: gray 4px solid; BORDER-TOP: gray 4px solid; FONT-WEIGHT: bold; FONT-SIZE: 15px; BORDER-LEFT: gray 4px solid; WIDTH: 100%; COLOR: gray; BORDER-BOTTOM: gray 4px solid; BACKGROUND-COLOR: silver; TEXT-ALIGN: center"&gt;&lt;br /&gt;
&lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/Default.aspx"&gt;Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c2_ASP.NET-Interview-Questions.aspx"&gt;ASP.NET Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c1_.NET-Interview-Questions.aspx"&gt;.NET Interview Questions &lt;/a&gt;&lt;br /&gt;
&lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c2_ASP.NET-Interview-Questions.aspx"&gt;ASP.NET 2.0 Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c1_.NET-Interview-Questions.aspx"&gt;.NET 2.0 Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/s23_SQL-Server-2005-Interview-Questions.aspx"&gt;SQL Server 2005 Interview Questions &lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;table width="100%" border="0"&gt;
    &lt;tbody&gt;
        &lt;tr align="center"&gt;
            &lt;td colspan="2"&gt;
            &lt;table width="100%" border="0" class="header"&gt;
                &lt;tbody&gt;
                    &lt;tr align="center"&gt;
                        &lt;td class="heading2" width="20%"&gt;VB.NET&lt;/td&gt;
                        &lt;td class="heading" width="60%"&gt;&lt;a name="progstruct"&gt;&lt;/a&gt;
                        &lt;h3&gt;Program Structure&lt;/h3&gt;
                        &lt;/td&gt;
                        &lt;td class="heading2" width="20%"&gt;C#&lt;/td&gt;
                    &lt;/tr&gt;
                &lt;/tbody&gt;
            &lt;/table&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr valign="top"&gt;
            &lt;td&gt;Imports System &lt;br /&gt;
            &lt;br /&gt;
            Namespace HelloNamespace&lt;br /&gt;
               Class HelloClass&lt;br /&gt;
                  Overloads Shared Sub &lt;strong&gt;Main&lt;/strong&gt;(ByVal args() As String) &lt;br /&gt;
                     Dim name As String = "VB.NET" &lt;br /&gt;
            &lt;br /&gt;
                     &lt;span class="comment"&gt;'If an argument was passed from the command line&lt;/span&gt;&lt;br /&gt;
                      If args.Length = 1 Then name = args(0) &lt;br /&gt;
            &lt;br /&gt;
                      Console.WriteLine("Hello, " &amp;amp; name &amp;amp; "!") &lt;br /&gt;
                  End Sub &lt;br /&gt;
               End Class &lt;br /&gt;
            End Namespace &lt;/td&gt;
            &lt;td&gt;using System; &lt;br /&gt;
            &lt;br /&gt;
            namespace HelloNamespace {&lt;br /&gt;
               public class HelloClass{&lt;br /&gt;
                  public static void &lt;strong&gt;Main&lt;/strong&gt;(string[] args) {&lt;br /&gt;
                     string name = "C#";&lt;br /&gt;
            &lt;br /&gt;
                     &lt;span class="comment"&gt;// If an argument was passed from the command line&lt;/span&gt;&lt;br /&gt;
                     if (args.Length == 1)&lt;br /&gt;
                        name = args[0];&lt;br /&gt;
            &lt;br /&gt;
                     Console.WriteLine("Hello, " + name + "!");&lt;br /&gt;
                  }&lt;br /&gt;
               }&lt;br /&gt;
            } &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td colspan="2"&gt;
            &lt;div style="BORDER-RIGHT: white 2px solid; BORDER-TOP: white 2px solid; BORDER-LEFT: white 2px solid; BORDER-BOTTOM: white 2px solid"&gt;&lt;br /&gt;
            &lt;div style="BORDER-RIGHT: gray 4px solid; BORDER-TOP: gray 4px solid; FONT-WEIGHT: bold; FONT-SIZE: 15px; BORDER-LEFT: gray 4px solid; WIDTH: 100%; COLOR: gray; BORDER-BOTTOM: gray 4px solid; BACKGROUND-COLOR: silver; TEXT-ALIGN: center"&gt;&lt;br /&gt;
            &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/Default.aspx"&gt;Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c2_ASP.NET-Interview-Questions.aspx"&gt;ASP.NET Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c1_.NET-Interview-Questions.aspx"&gt;.NET Interview Questions &lt;/a&gt;&lt;br /&gt;
            &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c2_ASP.NET-Interview-Questions.aspx"&gt;ASP.NET 2.0 Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c1_.NET-Interview-Questions.aspx"&gt;.NET 2.0 Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/s23_SQL-Server-2005-Interview-Questions.aspx"&gt;SQL Server 2005 Interview Questions &lt;/a&gt;&lt;br /&gt;
            &lt;br /&gt;
            &lt;/div&gt;
            &lt;/div&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr align="center"&gt;
            &lt;td colspan="2"&gt;
            &lt;table id="Table2" width="100%" border="0" class="header"&gt;
                &lt;tbody&gt;
                    &lt;tr align="center"&gt;
                        &lt;td class="heading2" width="20%"&gt;VB.NET&lt;/td&gt;
                        &lt;td class="heading" width="60%"&gt;&lt;a name="comments"&gt;&lt;/a&gt;
                        &lt;h3&gt;Comments&lt;/h3&gt;
                        &lt;/td&gt;
                        &lt;td class="heading2" width="20%"&gt;C#&lt;/td&gt;
                    &lt;/tr&gt;
                &lt;/tbody&gt;
            &lt;/table&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td height="16"&gt;&lt;span class="comment"&gt;' Single line only&lt;/span&gt;&lt;br /&gt;
            &lt;br /&gt;
            &lt;span class="comment"&gt;''' &amp;lt;summary&amp;gt;XML comments&amp;lt;/summary&amp;gt;&lt;/span&gt; &lt;/td&gt;
            &lt;td height="16"&gt;
            &lt;p&gt;&lt;span class="comment"&gt;// Single line&lt;br /&gt;
            /* Multiple&lt;br /&gt;
                line  */&lt;br /&gt;
            /// &amp;lt;summary&amp;gt;XML comments on single line&amp;lt;/summary&amp;gt;&lt;br /&gt;
            /** &amp;lt;summary&amp;gt;XML comments on multiple lines&amp;lt;/summary&amp;gt; */&lt;/span&gt;&lt;/p&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td colspan="2"&gt;
            &lt;div style="BORDER-RIGHT: white 2px solid; BORDER-TOP: white 2px solid; BORDER-LEFT: white 2px solid; BORDER-BOTTOM: white 2px solid"&gt;&lt;br /&gt;
            &lt;div style="BORDER-RIGHT: gray 4px solid; BORDER-TOP: gray 4px solid; FONT-WEIGHT: bold; FONT-SIZE: 15px; BORDER-LEFT: gray 4px solid; WIDTH: 100%; COLOR: gray; BORDER-BOTTOM: gray 4px solid; BACKGROUND-COLOR: silver; TEXT-ALIGN: center"&gt;&lt;br /&gt;
            &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/Default.aspx"&gt;Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c2_ASP.NET-Interview-Questions.aspx"&gt;ASP.NET Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c1_.NET-Interview-Questions.aspx"&gt;.NET Interview Questions &lt;/a&gt;&lt;br /&gt;
            &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c2_ASP.NET-Interview-Questions.aspx"&gt;ASP.NET 2.0 Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c1_.NET-Interview-Questions.aspx"&gt;.NET 2.0 Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/s23_SQL-Server-2005-Interview-Questions.aspx"&gt;SQL Server 2005 Interview Questions &lt;/a&gt;&lt;br /&gt;
            &lt;br /&gt;
            &lt;/div&gt;
            &lt;/div&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr align="center"&gt;
            &lt;td colspan="2"&gt;
            &lt;table id="Table3" width="100%" border="0" class="header"&gt;
                &lt;tbody&gt;
                    &lt;tr align="center"&gt;
                        &lt;td class="heading2" width="20%"&gt;VB.NET&lt;/td&gt;
                        &lt;td class="heading" width="60%"&gt;&lt;a name="datatypes"&gt;&lt;/a&gt;
                        &lt;h3&gt;Data Types&lt;/h3&gt;
                        &lt;/td&gt;
                        &lt;td class="heading2" width="20%"&gt;C#&lt;/td&gt;
                    &lt;/tr&gt;
                &lt;/tbody&gt;
            &lt;/table&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr valign="top"&gt;
            &lt;td height="80"&gt;
            &lt;p&gt;&lt;span class="comment"&gt;Value Types&lt;/span&gt;&lt;br /&gt;
            &lt;a target="_blank" href="http://msdn2.microsoft.com/en-us/library/wts33hb3(VS.71).aspx"&gt;Boolean&lt;/a&gt; &lt;br /&gt;
            &lt;a href="http://msdn2.microsoft.com/en-us/library/e2ayt412(VS.71).aspx"&gt;Byte&lt;/a&gt;, SByte&lt;br /&gt;
            &lt;a href="http://msdn2.microsoft.com/en-us/library/7sx7t66b(VS.71).aspx"&gt;Char&lt;/a&gt;&lt;br /&gt;
            &lt;a href="http://msdn2.microsoft.com/en-us/library/7tb7bdw6(VS.71).aspx"&gt;Short&lt;/a&gt;, UShort, Integer, UInteger, &lt;a href="http://msdn2.microsoft.com/en-us/library/y595sc15(VS.71).aspx"&gt;Long&lt;/a&gt;, ULong&lt;br /&gt;
            &lt;a href="http://msdn2.microsoft.com/en-us/library/xay7978z(VS.71).aspx"&gt;Single&lt;/a&gt;, &lt;a href="http://msdn2.microsoft.com/en-us/library/x99xtshc(VS.71).aspx"&gt;Double&lt;/a&gt;&lt;br /&gt;
            &lt;a href="http://msdn2.microsoft.com/en-us/library/xtba3z33(VS.71).aspx"&gt;Decimal&lt;/a&gt;&lt;br /&gt;
            &lt;a href="http://msdn2.microsoft.com/en-us/library/3eaydw6e(VS.71).aspx"&gt;Date&lt;/a&gt;&lt;/p&gt;
            &lt;p&gt;&lt;span class="comment"&gt;Reference Types&lt;/span&gt;&lt;br /&gt;
            &lt;a href="http://msdn2.microsoft.com/en-us/library/twcxd6b8(VS.71).aspx"&gt;Object&lt;/a&gt;&lt;br /&gt;
            &lt;a href="http://msdn2.microsoft.com/en-us/library/thwcx436(VS.71).aspx"&gt;String&lt;/a&gt;&lt;br /&gt;
            &lt;/p&gt;
            &lt;p&gt;&lt;span class="comment"&gt;Initializing&lt;/span&gt;&lt;br /&gt;
            Dim correct As Boolean = True&lt;br /&gt;
            Dim b As Byte = &amp;amp;H2A   &lt;span class="comment"&gt;'hex&lt;/span&gt;&lt;br /&gt;
            Dim o As Byte = &amp;amp;O52   &lt;span class="comment"&gt;'octal&lt;/span&gt;&lt;br /&gt;
            Dim person As Object = Nothing&lt;br /&gt;
            Dim name As String = "Dwight"&lt;br /&gt;
            Dim grade As Char = "B"c&lt;br /&gt;
            Dim today As Date = #12/31/2007 12:15:00 PM#&lt;br /&gt;
            Dim amount As Decimal = 35.99@&lt;br /&gt;
            Dim gpa As Single = 2.9!&lt;br /&gt;
            Dim pi As Double = 3.14159265&lt;br /&gt;
            Dim lTotal As Long = 123456L&lt;br /&gt;
            Dim sTotal As Short = 123S&lt;br /&gt;
            Dim usTotal As UShort = 123US&lt;br /&gt;
            Dim uiTotal As UInteger = 123UI&lt;br /&gt;
            Dim ulTotal As ULong = 123UL &lt;/p&gt;
            &lt;p&gt;&lt;span class="comment"&gt;Type Information&lt;/span&gt;&lt;br /&gt;
            &lt;strong&gt;Dim&lt;/strong&gt; x &lt;strong&gt;As&lt;/strong&gt; Integer &lt;br /&gt;
            Console.WriteLine(x.&lt;strong&gt;GetType&lt;/strong&gt;())          &lt;span class="comment"&gt;' Prints System.Int32&lt;/span&gt; &lt;br /&gt;
            Console.WriteLine(&lt;strong&gt;GetType&lt;/strong&gt;(Integer))   &lt;span class="comment"&gt;' Prints System.Int32&lt;/span&gt; &lt;br /&gt;
            Console.WriteLine(&lt;strong&gt;TypeName&lt;/strong&gt;(x))        &lt;span class="comment"&gt;' Prints Integer&lt;/span&gt;&lt;/p&gt;
            &lt;p&gt;&lt;span class="comment"&gt;Type Conversion&lt;/span&gt;&lt;br /&gt;
            Dim d As Single = 3.5 &lt;br /&gt;
            Dim i As Integer = &lt;strong&gt;CType&lt;/strong&gt;(d, Integer)   &lt;span class="comment"&gt;' set to 4 (Banker's rounding)&lt;/span&gt;&lt;br /&gt;
            i = &lt;strong&gt;CInt&lt;/strong&gt;(d)  &lt;span class="comment"&gt;' same result as CType&lt;/span&gt;&lt;br /&gt;
            i = &lt;strong&gt;Int&lt;/strong&gt;(d)    &lt;span class="comment"&gt;' set to 3 (Int function truncates the decimal)&lt;/span&gt;&lt;/p&gt;
            &lt;/td&gt;
            &lt;td height="80"&gt;
            &lt;p&gt;&lt;span class="comment"&gt;Value Types&lt;/span&gt;&lt;br /&gt;
            &lt;a href="http://msdn2.microsoft.com/en-us/library/c8f5xwh7(VS.71).aspx"&gt;bool&lt;/a&gt;&lt;br /&gt;
            &lt;a href="http://msdn2.microsoft.com/en-us/library/5bdb6693(VS.71).aspx"&gt;byte&lt;/a&gt;, sbyte&lt;br /&gt;
            &lt;a href="http://msdn2.microsoft.com/en-us/library/x9h8tsay(VS.71).aspx"&gt;char&lt;/a&gt;&lt;br /&gt;
            &lt;a href="http://msdn2.microsoft.com/en-us/library/ybs77ex4(VS.71).aspx"&gt;short&lt;/a&gt;, ushort, int, uint, long, ulong&lt;br /&gt;
            &lt;a href="http://msdn2.microsoft.com/en-us/library/b1e65aza(VS.71).aspx"&gt;float&lt;/a&gt;, &lt;a href="http://msdn2.microsoft.com/en-us/library/678hzkk9(VS.71).aspx"&gt;double&lt;/a&gt;&lt;br /&gt;
            &lt;a href="http://msdn2.microsoft.com/en-us/library/364x0z75(VS.71).aspx"&gt;decimal&lt;/a&gt;&lt;br /&gt;
            DateTime   &lt;span class="comment"&gt;(not a built-in C# type)&lt;/span&gt;&lt;/p&gt;
            &lt;p&gt;&lt;span class="comment"&gt;Reference Types&lt;/span&gt;&lt;br /&gt;
            &lt;a href="http://msdn2.microsoft.com/en-us/library/9kkx3h3c(VS.71).aspx"&gt;object&lt;/a&gt;&lt;br /&gt;
            &lt;a href="http://msdn2.microsoft.com/en-us/library/362314fe(VS.71).aspx"&gt;string&lt;/a&gt;&lt;br /&gt;
            &lt;/p&gt;
            &lt;p&gt;&lt;span class="comment"&gt;Initializing&lt;/span&gt;&lt;br /&gt;
            bool correct = true;&lt;br /&gt;
            byte b = 0x2A;   &lt;span class="comment"&gt;// hex&lt;/span&gt;&lt;br /&gt;
            &lt;br /&gt;
            object person = null;&lt;br /&gt;
            string name = "Dwight";&lt;br /&gt;
            char grade = 'B';&lt;br /&gt;
            DateTime today = DateTime.Parse("12/31/2007 12:15:00");&lt;br /&gt;
            decimal amount = 35.99m;&lt;br /&gt;
            float gpa = 2.9f;&lt;br /&gt;
            double pi = 3.14159265;&lt;br /&gt;
            long lTotal = 123456L;&lt;br /&gt;
            short sTotal = 123;&lt;br /&gt;
            ushort usTotal = 123;&lt;br /&gt;
            uint uiTotal = 123;&lt;br /&gt;
            ulong ulTotal = 123;&lt;br /&gt;
            &lt;/p&gt;
            &lt;p&gt;&lt;span class="comment"&gt;Type Information&lt;/span&gt;&lt;br /&gt;
            int x;&lt;br /&gt;
            Console.WriteLine(x.&lt;strong&gt;GetType&lt;/strong&gt;());              &lt;span class="comment"&gt;// Prints System.Int32&lt;/span&gt;&lt;br /&gt;
            Console.WriteLine(&lt;strong&gt;typeof&lt;/strong&gt;(int));               &lt;span class="comment"&gt;// Prints System.Int32&lt;/span&gt; &lt;br /&gt;
            Console.WriteLine(x.&lt;strong&gt;GetType().Name&lt;/strong&gt;);   &lt;span class="comment"&gt;// prints Int32&lt;/span&gt; &lt;/p&gt;
            &lt;p&gt;&lt;span class="comment"&gt;Type Conversion&lt;/span&gt; &lt;br /&gt;
            float d = 3.5f; &lt;br /&gt;
            int i = &lt;strong&gt;(int)&lt;/strong&gt;d;   &lt;span class="comment"&gt;// set to 3  (truncates decimal)&lt;/span&gt;&lt;/p&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td colspan="2"&gt;
            &lt;div style="BORDER-RIGHT: white 2px solid; BORDER-TOP: white 2px solid; BORDER-LEFT: white 2px solid; BORDER-BOTTOM: white 2px solid"&gt;&lt;br /&gt;
            &lt;div style="BORDER-RIGHT: gray 4px solid; BORDER-TOP: gray 4px solid; FONT-WEIGHT: bold; FONT-SIZE: 15px; BORDER-LEFT: gray 4px solid; WIDTH: 100%; COLOR: gray; BORDER-BOTTOM: gray 4px solid; BACKGROUND-COLOR: silver; TEXT-ALIGN: center"&gt;&lt;br /&gt;
            &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/Default.aspx"&gt;Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c2_ASP.NET-Interview-Questions.aspx"&gt;ASP.NET Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c1_.NET-Interview-Questions.aspx"&gt;.NET Interview Questions &lt;/a&gt;&lt;br /&gt;
            &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c2_ASP.NET-Interview-Questions.aspx"&gt;ASP.NET 2.0 Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c1_.NET-Interview-Questions.aspx"&gt;.NET 2.0 Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/s23_SQL-Server-2005-Interview-Questions.aspx"&gt;SQL Server 2005 Interview Questions &lt;/a&gt;&lt;br /&gt;
            &lt;br /&gt;
            &lt;/div&gt;
            &lt;/div&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr align="center"&gt;
            &lt;td colspan="2"&gt;
            &lt;table id="Table4" width="100%" border="0" class="header"&gt;
                &lt;tbody&gt;
                    &lt;tr align="center"&gt;
                        &lt;td class="heading2" width="20%"&gt;VB.NET&lt;/td&gt;
                        &lt;td class="heading" width="60%"&gt;&lt;a name="constants"&gt;&lt;/a&gt;
                        &lt;h3&gt;Constants&lt;/h3&gt;
                        &lt;/td&gt;
                        &lt;td class="heading2" width="20%"&gt;C#&lt;/td&gt;
                    &lt;/tr&gt;
                &lt;/tbody&gt;
            &lt;/table&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td height="16"&gt;&lt;strong&gt;Const&lt;/strong&gt; MAX_STUDENTS &lt;strong&gt;As&lt;/strong&gt; Integer = 25
            &lt;p&gt;&lt;span class="comment"&gt;' Can set to a const or var; may be initialized in a constructor&lt;/span&gt;&lt;br /&gt;
            &lt;strong&gt;ReadOnly&lt;/strong&gt; MIN_DIAMETER &lt;strong&gt;As&lt;/strong&gt; Single = 4.93 &lt;/p&gt;
            &lt;/td&gt;
            &lt;td height="16"&gt;&lt;strong&gt;const&lt;/strong&gt; int MAX_STUDENTS = 25;
            &lt;p&gt;&lt;span class="comment"&gt;// Can set to a const or var; may be initialized in a constructor &lt;/span&gt;&lt;br /&gt;
            &lt;strong&gt;readonly&lt;/strong&gt; float MIN_DIAMETER = 4.93f; &lt;/p&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td colspan="2"&gt;
            &lt;div style="BORDER-RIGHT: white 2px solid; BORDER-TOP: white 2px solid; BORDER-LEFT: white 2px solid; BORDER-BOTTOM: white 2px solid"&gt;&lt;br /&gt;
            &lt;div style="BORDER-RIGHT: gray 4px solid; BORDER-TOP: gray 4px solid; FONT-WEIGHT: bold; FONT-SIZE: 15px; BORDER-LEFT: gray 4px solid; WIDTH: 100%; COLOR: gray; BORDER-BOTTOM: gray 4px solid; BACKGROUND-COLOR: silver; TEXT-ALIGN: center"&gt;&lt;br /&gt;
            &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/Default.aspx"&gt;Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c2_ASP.NET-Interview-Questions.aspx"&gt;ASP.NET Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c1_.NET-Interview-Questions.aspx"&gt;.NET Interview Questions &lt;/a&gt;&lt;br /&gt;
            &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c2_ASP.NET-Interview-Questions.aspx"&gt;ASP.NET 2.0 Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c1_.NET-Interview-Questions.aspx"&gt;.NET 2.0 Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/s23_SQL-Server-2005-Interview-Questions.aspx"&gt;SQL Server 2005 Interview Questions &lt;/a&gt;&lt;br /&gt;
            &lt;br /&gt;
            &lt;/div&gt;
            &lt;/div&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr align="center"&gt;
            &lt;td colspan="2"&gt;
            &lt;table id="Table5" width="100%" border="0" class="header"&gt;
                &lt;tbody&gt;
                    &lt;tr align="center"&gt;
                        &lt;td class="heading2" width="20%"&gt;VB.NET&lt;/td&gt;
                        &lt;td class="heading" width="60%"&gt;&lt;a name="enumerations"&gt;&lt;/a&gt;
                        &lt;h3&gt;Enumerations&lt;/h3&gt;
                        &lt;/td&gt;
                        &lt;td class="heading2" width="20%"&gt;C#&lt;/td&gt;
                    &lt;/tr&gt;
                &lt;/tbody&gt;
            &lt;/table&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr valign="top"&gt;
            &lt;td&gt;&lt;span&gt;&lt;strong&gt;Enum&lt;/strong&gt; Action &lt;br /&gt;
              Start &lt;br /&gt;
              [Stop]   &lt;span class="comment"&gt;' Stop is a reserved word&lt;/span&gt;&lt;br /&gt;
              Rewind &lt;br /&gt;
              Forward &lt;br /&gt;
            &lt;strong&gt;End Enum&lt;/strong&gt; &lt;br /&gt;
            &lt;br /&gt;
            &lt;strong&gt;Enum&lt;/strong&gt; Status &lt;br /&gt;
              Flunk = 50 &lt;br /&gt;
              Pass = 70 &lt;br /&gt;
              Excel = 90 &lt;br /&gt;
            &lt;strong&gt;End Enum&lt;br /&gt;
            &lt;/strong&gt;&lt;br /&gt;
            Dim a As Action = Action.Stop &lt;br /&gt;
            If a &amp;lt;&amp;gt; Action.Start Then _ &lt;br /&gt;
               Console.WriteLine(a.ToString &amp;amp; " is " &amp;amp; a)     &lt;span class="comment"&gt;' Prints "Stop is 1"&lt;/span&gt; &lt;br /&gt;
            &lt;br /&gt;
            Console.WriteLine(Status.Pass)     &lt;span class="comment"&gt;' Prints 70&lt;/span&gt; &lt;br /&gt;
            Console.WriteLine(Status.Pass.ToString())     &lt;span class="comment"&gt;' Prints Pass&lt;/span&gt;&lt;/span&gt; &lt;/td&gt;
            &lt;td height="112"&gt;&lt;strong&gt;enum&lt;/strong&gt; Action {Start, Stop, Rewind, Forward};&lt;br /&gt;
            &lt;strong&gt;enum&lt;/strong&gt; Status {Flunk = 50, Pass = 70, Excel = 90};&lt;br /&gt;
            &lt;br /&gt;
            Action a = Action.Stop;&lt;br /&gt;
            if (a != Action.Start)&lt;br /&gt;
              Console.WriteLine(a + " is " + (int) a);    &lt;span class="comment"&gt;// Prints "Stop is 1"&lt;/span&gt;&lt;br /&gt;
            &lt;br /&gt;
            Console.WriteLine((int) Status.Pass);    &lt;span class="comment"&gt;// Prints 70&lt;/span&gt; &lt;br /&gt;
            Console.WriteLine(Status.Pass);      &lt;span class="comment"&gt;// Prints Pass&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td colspan="2"&gt;
            &lt;div style="BORDER-RIGHT: white 2px solid; BORDER-TOP: white 2px solid; BORDER-LEFT: white 2px solid; BORDER-BOTTOM: white 2px solid"&gt;&lt;br /&gt;
            &lt;div style="BORDER-RIGHT: gray 4px solid; BORDER-TOP: gray 4px solid; FONT-WEIGHT: bold; FONT-SIZE: 15px; BORDER-LEFT: gray 4px solid; WIDTH: 100%; COLOR: gray; BORDER-BOTTOM: gray 4px solid; BACKGROUND-COLOR: silver; TEXT-ALIGN: center"&gt;&lt;br /&gt;
            &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/Default.aspx"&gt;Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c2_ASP.NET-Interview-Questions.aspx"&gt;ASP.NET Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c1_.NET-Interview-Questions.aspx"&gt;.NET Interview Questions &lt;/a&gt;&lt;br /&gt;
            &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c2_ASP.NET-Interview-Questions.aspx"&gt;ASP.NET 2.0 Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c1_.NET-Interview-Questions.aspx"&gt;.NET 2.0 Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/s23_SQL-Server-2005-Interview-Questions.aspx"&gt;SQL Server 2005 Interview Questions &lt;/a&gt;&lt;br /&gt;
            &lt;br /&gt;
            &lt;/div&gt;
            &lt;/div&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr align="center"&gt;
            &lt;td colspan="2"&gt;
            &lt;table id="Table6" width="100%" border="0" class="header"&gt;
                &lt;tbody&gt;
                    &lt;tr align="center"&gt;
                        &lt;td class="heading2" width="20%"&gt;VB.NET&lt;/td&gt;
                        &lt;td class="heading" width="60%"&gt;&lt;a name="operators"&gt;&lt;/a&gt;
                        &lt;h3&gt;Operators&lt;/h3&gt;
                        &lt;/td&gt;
                        &lt;td class="heading2" width="20%"&gt;C#&lt;/td&gt;
                    &lt;/tr&gt;
                &lt;/tbody&gt;
            &lt;/table&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td height="16"&gt;
            &lt;p&gt;&lt;span class="comment"&gt;Comparison&lt;/span&gt;&lt;br /&gt;
            =  &amp;lt;  &amp;gt;  &amp;lt;=  &amp;gt;=  &amp;lt;&amp;gt;&lt;/p&gt;
            &lt;p&gt;&lt;span class="comment"&gt;Arithmetic&lt;/span&gt;&lt;br /&gt;
            +  -  *  /&lt;br /&gt;
            Mod&lt;br /&gt;
            \  &lt;span class="comment"&gt;(integer division)&lt;/span&gt;&lt;br /&gt;
            ^  &lt;span class="comment"&gt;(raise to a power)&lt;/span&gt;&lt;/p&gt;
            &lt;p&gt;&lt;span class="comment"&gt;Assignment&lt;/span&gt;&lt;br /&gt;
            =  +=  -=  *=  /=  \=  ^=  &amp;lt;&amp;lt;=  &amp;gt;&amp;gt;=  &amp;amp;=&lt;/p&gt;
            &lt;p&gt;&lt;span class="comment"&gt;Bitwise&lt;/span&gt;&lt;br /&gt;
            And   Or   Xor   Not   &amp;lt;&amp;lt;   &amp;gt;&amp;gt;&lt;/p&gt;
            &lt;p&gt;&lt;span class="comment"&gt;Logical&lt;/span&gt;&lt;br /&gt;
            AndAlso   OrElse   And   Or   Xor   Not&lt;/p&gt;
            &lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; AndAlso and OrElse perform short-circuit logical evaluations&lt;/p&gt;
            &lt;p&gt;&lt;span class="comment"&gt;String Concatenation&lt;/span&gt;&lt;br /&gt;
            &amp;amp; &lt;/p&gt;
            &lt;/td&gt;
            &lt;td height="16"&gt;
            &lt;p&gt;&lt;span class="comment"&gt;Comparison&lt;/span&gt;&lt;br /&gt;
            ==  &amp;lt;  &amp;gt;  &amp;lt;=  &amp;gt;=  !=&lt;/p&gt;
            &lt;p&gt;&lt;span class="comment"&gt;Arithmetic&lt;/span&gt;&lt;br /&gt;
            +  -  *  /&lt;br /&gt;
            %  &lt;span class="comment"&gt;(mod)&lt;/span&gt;&lt;br /&gt;
            /  &lt;span class="comment"&gt;(integer division if both operands are ints)&lt;/span&gt;&lt;br /&gt;
            Math.Pow(x, y)&lt;/p&gt;
            &lt;p&gt;&lt;span class="comment"&gt;Assignment&lt;/span&gt;&lt;br /&gt;
            =  +=  -=  *=  /=   %=  &amp;amp;=  |=  ^=  &amp;lt;&amp;lt;=  &amp;gt;&amp;gt;=  ++  --&lt;/p&gt;
            &lt;p&gt;&lt;span class="comment"&gt;Bitwise&lt;/span&gt;&lt;br /&gt;
            &amp;amp;   |   ^   ~   &amp;lt;&amp;lt;   &amp;gt;&amp;gt;&lt;/p&gt;
            &lt;p&gt;&lt;span class="comment"&gt;Logical&lt;/span&gt;&lt;br /&gt;
            &amp;amp;&amp;amp;   ||   &amp;amp;   |   ^   !&lt;/p&gt;
            &lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; &amp;amp;&amp;amp; and || perform short-circuit logical evaluations&lt;/p&gt;
            &lt;p&gt;&lt;span class="comment"&gt;String Concatenation&lt;/span&gt;&lt;br /&gt;
            +&lt;/p&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td colspan="2"&gt;
            &lt;div style="BORDER-RIGHT: white 2px solid; BORDER-TOP: white 2px solid; BORDER-LEFT: white 2px solid; BORDER-BOTTOM: white 2px solid"&gt;&lt;br /&gt;
            &lt;div style="BORDER-RIGHT: gray 4px solid; BORDER-TOP: gray 4px solid; FONT-WEIGHT: bold; FONT-SIZE: 15px; BORDER-LEFT: gray 4px solid; WIDTH: 100%; COLOR: gray; BORDER-BOTTOM: gray 4px solid; BACKGROUND-COLOR: silver; TEXT-ALIGN: center"&gt;&lt;br /&gt;
            &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/Default.aspx"&gt;Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c2_ASP.NET-Interview-Questions.aspx"&gt;ASP.NET Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c1_.NET-Interview-Questions.aspx"&gt;.NET Interview Questions &lt;/a&gt;&lt;br /&gt;
            &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c2_ASP.NET-Interview-Questions.aspx"&gt;ASP.NET 2.0 Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c1_.NET-Interview-Questions.aspx"&gt;.NET 2.0 Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/s23_SQL-Server-2005-Interview-Questions.aspx"&gt;SQL Server 2005 Interview Questions &lt;/a&gt;&lt;br /&gt;
            &lt;br /&gt;
            &lt;/div&gt;
            &lt;/div&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr align="center"&gt;
            &lt;td colspan="2"&gt;
            &lt;table id="Table7" width="100%" border="0" class="header"&gt;
                &lt;tbody&gt;
                    &lt;tr align="center"&gt;
                        &lt;td class="heading2" width="20%"&gt;VB.NET&lt;/td&gt;
                        &lt;td class="heading" width="60%"&gt;&lt;a name="choices"&gt;&lt;/a&gt;
                        &lt;h3&gt;Choices&lt;/h3&gt;
                        &lt;/td&gt;
                        &lt;td class="heading2" width="20%"&gt;C#&lt;/td&gt;
                    &lt;/tr&gt;
                &lt;/tbody&gt;
            &lt;/table&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr valign="top"&gt;
            &lt;td height="163"&gt;
            &lt;p&gt;greeting = &lt;strong&gt;IIf&lt;/strong&gt;(age &amp;lt; 20, "What's up?", "Hello")&lt;/p&gt;
            &lt;p&gt;&lt;span class="comment"&gt;' One line doesn't require "End If"&lt;/span&gt;&lt;br /&gt;
            &lt;strong&gt;If&lt;/strong&gt; age &amp;lt; 20 &lt;strong&gt;Then&lt;/strong&gt; greeting = "What's up?" &lt;br /&gt;
            &lt;strong&gt;If&lt;/strong&gt; age &amp;lt; 20 &lt;strong&gt;Then&lt;/strong&gt; greeting = "What's up?" &lt;strong&gt;Else&lt;/strong&gt; greeting = "Hello" &lt;/p&gt;
            &lt;p&gt;&lt;span class="comment"&gt;' Use : to put two commands on same line&lt;/span&gt;&lt;br /&gt;
            &lt;strong&gt;If&lt;/strong&gt; x &amp;lt;&amp;gt; 100 And y &amp;lt; 5 &lt;strong&gt;Then&lt;/strong&gt; x *= 5 &lt;strong&gt;:&lt;/strong&gt; y *= 2  &lt;/p&gt;
            &lt;p&gt;&lt;span class="comment"&gt;' Preferred&lt;/span&gt;&lt;br /&gt;
            &lt;strong&gt;If&lt;/strong&gt; x &amp;lt;&amp;gt; 100 And y &amp;lt; 5 &lt;strong&gt;Then&lt;/strong&gt;&lt;br /&gt;
              x *= 5 &lt;br /&gt;
              y *= 2&lt;br /&gt;
            &lt;strong&gt;End If&lt;/strong&gt;&lt;/p&gt;
            &lt;p&gt;&lt;span class="comment"&gt;' To break up any long single line use _&lt;/span&gt;&lt;br /&gt;
            &lt;strong&gt;If&lt;/strong&gt; whenYouHaveAReally &amp;lt; longLine And _ &lt;br /&gt;
              itNeedsToBeBrokenInto2 &amp;gt; Lines &lt;strong&gt;Then&lt;/strong&gt; _&lt;br /&gt;
              UseTheUnderscore(charToBreakItUp)&lt;/p&gt;
            &lt;p&gt;&lt;span class="comment"&gt;'&lt;/span&gt;&lt;strong&gt;If&lt;/strong&gt; x &amp;gt; 5 &lt;strong&gt;Then&lt;/strong&gt; &lt;br /&gt;
              x *= y &lt;br /&gt;
            &lt;strong&gt;ElseIf&lt;/strong&gt; x = 5 &lt;strong&gt;Then&lt;/strong&gt; &lt;br /&gt;
              x += y &lt;br /&gt;
            &lt;strong&gt;ElseIf&lt;/strong&gt; x &amp;lt; 10 &lt;strong&gt;Then&lt;/strong&gt; &lt;br /&gt;
              x -= y &lt;br /&gt;
            &lt;strong&gt;Else&lt;/strong&gt; &lt;br /&gt;
              x /= y &lt;br /&gt;
            &lt;strong&gt;End If&lt;/strong&gt;&lt;/p&gt;
            &lt;p&gt;&lt;strong&gt;Select Case&lt;/strong&gt; color   &lt;span class="comment"&gt;' Must be a primitive data type&lt;/span&gt;&lt;br /&gt;
              &lt;strong&gt;Case&lt;/strong&gt; "pink", "red"&lt;br /&gt;
                r += 1 &lt;br /&gt;
              &lt;strong&gt;Case&lt;/strong&gt; "blue" &lt;br /&gt;
                b += 1 &lt;br /&gt;
              &lt;strong&gt;Case&lt;/strong&gt; "green" &lt;br /&gt;
                g += 1 &lt;br /&gt;
              &lt;strong&gt;Case Else&lt;/strong&gt; &lt;br /&gt;
                other += 1 &lt;br /&gt;
            &lt;strong&gt;End Select&lt;/strong&gt; &lt;/p&gt;
            &lt;/td&gt;
            &lt;td height="163"&gt;
            &lt;p&gt;greeting = age &amp;lt; 20 &lt;strong&gt;?&lt;/strong&gt; "What's up?" &lt;strong&gt;:&lt;/strong&gt; "Hello";&lt;/p&gt;
            &lt;p&gt;&lt;strong&gt;if&lt;/strong&gt; (age &amp;lt; 20)&lt;br /&gt;
              greeting = "What's up?";&lt;br /&gt;
            &lt;strong&gt;else&lt;/strong&gt;&lt;br /&gt;
              greeting = "Hello"; &lt;/p&gt;
            &lt;p&gt;&lt;span class="comment"&gt;// Multiple statements must be enclosed in {}&lt;/span&gt;&lt;br /&gt;
            &lt;strong&gt;if&lt;/strong&gt; (x != 100 &amp;amp;&amp;amp; y &amp;lt; 5) {   &lt;br /&gt;
              x *= 5;&lt;br /&gt;
              y *= 2;&lt;br /&gt;
            }&lt;/p&gt;
            &lt;br /&gt;
            &lt;br /&gt;
            &lt;p&gt;&lt;span class="comment"&gt;No need for _ or : since ; is used to terminate each statement.&lt;/span&gt;&lt;/p&gt;
            &lt;p&gt;&lt;br /&gt;
            &lt;br /&gt;
            &lt;br /&gt;
            &lt;strong&gt;&lt;br /&gt;
            if&lt;/strong&gt; (x &amp;gt; 5) &lt;br /&gt;
              x *= y; &lt;br /&gt;
            &lt;strong&gt;else&lt;/strong&gt; if (x == 5) &lt;br /&gt;
              x += y; &lt;br /&gt;
            &lt;strong&gt;else&lt;/strong&gt; if (x &amp;lt; 10) &lt;br /&gt;
              x -= y; &lt;br /&gt;
            &lt;strong&gt;else&lt;/strong&gt; &lt;br /&gt;
              x /= y;&lt;br /&gt;
            &lt;/p&gt;
            &lt;p&gt;&lt;br /&gt;
            &lt;br /&gt;
            &lt;span class="comment"&gt;// Every case must end with break or goto case&lt;/span&gt; &lt;br /&gt;
            &lt;strong&gt;switch&lt;/strong&gt; (color) {                          &lt;em&gt;&lt;font color="#008000"&gt;// Must be integer or string&lt;/font&gt;&lt;/em&gt;&lt;br /&gt;
              &lt;strong&gt;case&lt;/strong&gt; "pink":&lt;br /&gt;
              &lt;strong&gt;case&lt;/strong&gt; "red":    r++;    &lt;strong&gt;break;&lt;/strong&gt; &lt;br /&gt;
              &lt;strong&gt;case&lt;/strong&gt; "blue":   b++;   &lt;strong&gt;break;&lt;br /&gt;
            &lt;/strong&gt;  &lt;strong&gt;case&lt;/strong&gt; "green": g++;   &lt;strong&gt;break;&lt;br /&gt;
            &lt;/strong&gt;  &lt;strong&gt;default:&lt;/strong&gt;    other++;  &lt;strong&gt; break;&lt;/strong&gt;       &lt;span class="comment"&gt;// break necessary on default&lt;/span&gt;&lt;br /&gt;
            } &lt;/p&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td colspan="2"&gt;
            &lt;div style="BORDER-RIGHT: white 2px solid; BORDER-TOP: white 2px solid; BORDER-LEFT: white 2px solid; BORDER-BOTTOM: white 2px solid"&gt;&lt;br /&gt;
            &lt;div style="BORDER-RIGHT: gray 4px solid; BORDER-TOP: gray 4px solid; FONT-WEIGHT: bold; FONT-SIZE: 15px; BORDER-LEFT: gray 4px solid; WIDTH: 100%; COLOR: gray; BORDER-BOTTOM: gray 4px solid; BACKGROUND-COLOR: silver; TEXT-ALIGN: center"&gt;&lt;br /&gt;
            &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/Default.aspx"&gt;Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c2_ASP.NET-Interview-Questions.aspx"&gt;ASP.NET Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c1_.NET-Interview-Questions.aspx"&gt;.NET Interview Questions &lt;/a&gt;&lt;br /&gt;
            &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c2_ASP.NET-Interview-Questions.aspx"&gt;ASP.NET 2.0 Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c1_.NET-Interview-Questions.aspx"&gt;.NET 2.0 Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/s23_SQL-Server-2005-Interview-Questions.aspx"&gt;SQL Server 2005 Interview Questions &lt;/a&gt;&lt;br /&gt;
            &lt;br /&gt;
            &lt;/div&gt;
            &lt;/div&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr align="center"&gt;
            &lt;td colspan="2"&gt;
            &lt;table id="Table8" width="100%" border="0" class="header"&gt;
                &lt;tbody&gt;
                    &lt;tr align="center"&gt;
                        &lt;td class="heading2" width="20%"&gt;VB.NET&lt;/td&gt;
                        &lt;td class="heading" width="60%"&gt;&lt;a name="loops"&gt;&lt;/a&gt;
                        &lt;h3&gt;Loops&lt;/h3&gt;
                        &lt;/td&gt;
                        &lt;td class="heading2" width="20%"&gt;C#&lt;/td&gt;
                    &lt;/tr&gt;
                &lt;/tbody&gt;
            &lt;/table&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td valign="top"&gt;
            &lt;table id="Table1" width="100%" border="0"&gt;
                &lt;tbody&gt;
                    &lt;tr&gt;
                        &lt;td colspan="2"&gt;&lt;span class="comment"&gt;Pre-test Loops:&lt;/span&gt; &lt;/td&gt;
                    &lt;/tr&gt;
                    &lt;tr&gt;
                        &lt;td width="50%"&gt;&lt;strong&gt;While&lt;/strong&gt; c &amp;lt; 10 &lt;br /&gt;
                          c += 1 &lt;br /&gt;
                        &lt;strong&gt;End While&lt;/strong&gt; &lt;/td&gt;
                        &lt;td width="50%"&gt;
                        &lt;p&gt;&lt;strong&gt;Do Until&lt;/strong&gt; c = 10 &lt;br /&gt;
                          c += 1 &lt;br /&gt;
                        &lt;strong&gt;Loop&lt;/strong&gt;&lt;/p&gt;
                        &lt;/td&gt;
                    &lt;/tr&gt;
                    &lt;tr&gt;
                        &lt;td&gt;&lt;strong&gt;Do While&lt;/strong&gt; c &amp;lt; 10 &lt;br /&gt;
                          c += 1 &lt;br /&gt;
                        &lt;strong&gt;Loop&lt;/strong&gt; &lt;/td&gt;
                        &lt;td&gt;
                        &lt;p&gt;&lt;strong&gt;For&lt;/strong&gt; c = 2 &lt;strong&gt;To&lt;/strong&gt; 10 &lt;strong&gt;Step&lt;/strong&gt; 2 &lt;br /&gt;
                          Console.WriteLine(c) &lt;br /&gt;
                        &lt;strong&gt;Next&lt;/strong&gt; &lt;/p&gt;
                        &lt;/td&gt;
                    &lt;/tr&gt;
                    &lt;tr&gt;
                        &lt;td colspan="2"&gt;&lt;span class="comment"&gt;&lt;br /&gt;
                        Post-test Loops:&lt;/span&gt; &lt;/td&gt;
                    &lt;/tr&gt;
                    &lt;tr&gt;
                        &lt;td&gt;&lt;strong&gt;Do&lt;/strong&gt; &lt;br /&gt;
                          c += 1 &lt;br /&gt;
                        &lt;strong&gt;Loop While&lt;/strong&gt; c &amp;lt; 10 &lt;/td&gt;
                        &lt;td&gt;&lt;strong&gt;Do&lt;/strong&gt; &lt;br /&gt;
                          c += 1 &lt;br /&gt;
                        &lt;strong&gt;Loop Until&lt;/strong&gt; c = 10 &lt;/td&gt;
                    &lt;/tr&gt;
                &lt;/tbody&gt;
            &lt;/table&gt;
            &lt;p&gt;&lt;span class="comment"&gt;'  Array or collection looping&lt;/span&gt;&lt;br /&gt;
            Dim names As String() = {"Fred", "Sue", "Barney"} &lt;br /&gt;
            &lt;strong&gt;For Each&lt;/strong&gt; s As String&lt;strong&gt; In&lt;/strong&gt; names &lt;br /&gt;
              Console.WriteLine(s) &lt;br /&gt;
            &lt;strong&gt;Next&lt;/strong&gt; &lt;/p&gt;
            &lt;p&gt;&lt;span class="comment"&gt;' Breaking out of loops&lt;/span&gt;&lt;br /&gt;
            Dim i As Integer = 0&lt;br /&gt;
            While (True)&lt;br /&gt;
              If (i = 5) Then &lt;strong&gt;Exit While&lt;/strong&gt;&lt;br /&gt;
              i += 1&lt;br /&gt;
            End While &lt;br /&gt;
            &lt;br /&gt;
            &lt;br /&gt;
            &lt;/p&gt;
            &lt;p&gt;&lt;span class="comment"&gt;' Continue to next iteration&lt;/span&gt;&lt;br /&gt;
            For i = 0 To 4&lt;br /&gt;
              If i &amp;lt; 4 Then &lt;strong&gt;Continue For&lt;/strong&gt;&lt;br /&gt;
              Console.WriteLine(i)   &lt;span class="comment"&gt;' Only prints 4&lt;/span&gt;&lt;br /&gt;
            Next &lt;/p&gt;
            &lt;/td&gt;
            &lt;td valign="top" height="259"&gt;&lt;span class="comment"&gt;Pre-test Loops:&lt;/span&gt;  
            &lt;p&gt;&lt;span class="comment"&gt;// no "until" keyword&lt;/span&gt;&lt;br /&gt;
            &lt;strong&gt;while&lt;/strong&gt; (c &amp;lt; 10) &lt;br /&gt;
              c++;&lt;br /&gt;
            &lt;br /&gt;
            &lt;strong&gt;for&lt;/strong&gt; (c = 2; c &amp;lt;= 10; c += 2) &lt;br /&gt;
              Console.WriteLine(c);&lt;/p&gt;
            &lt;p&gt;&lt;br /&gt;
            &lt;br /&gt;
            &lt;span class="comment"&gt;Post-test Loop:&lt;/span&gt;&lt;br /&gt;
            &lt;br /&gt;
            &lt;strong&gt;do&lt;/strong&gt; &lt;br /&gt;
              c++; &lt;br /&gt;
            &lt;strong&gt;while&lt;/strong&gt; (c &amp;lt; 10);&lt;br /&gt;
            &lt;br /&gt;
            &lt;br /&gt;
            &lt;br /&gt;
            &lt;span class="comment"&gt;// Array or collection looping&lt;/span&gt;&lt;br /&gt;
            string[] names = {"Fred", "Sue", "Barney"};&lt;br /&gt;
            &lt;strong&gt;foreach&lt;/strong&gt; (string s &lt;strong&gt;in&lt;/strong&gt; names)&lt;br /&gt;
              Console.WriteLine(s);&lt;/p&gt;
            &lt;p&gt;&lt;span class="comment"&gt;// Breaking out of loops&lt;/span&gt;&lt;br /&gt;
            int i = 0;&lt;br /&gt;
            while (true) {&lt;br /&gt;
              if (i == 5)&lt;br /&gt;
                &lt;strong&gt;break;&lt;/strong&gt;&lt;br /&gt;
              i++;&lt;br /&gt;
            } &lt;/p&gt;
            &lt;p&gt;&lt;span class="comment"&gt;// Continue to next iteration&lt;/span&gt;&lt;br /&gt;
            for (i = 0; i &amp;lt; 5; i++) {&lt;br /&gt;
              if (i &amp;lt; 4)&lt;br /&gt;
                &lt;strong&gt;continue;&lt;/strong&gt;&lt;br /&gt;
              Console.WriteLine(i);   &lt;span class="comment"&gt;// Only prints 4&lt;/span&gt;&lt;br /&gt;
            } &lt;/p&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td colspan="2"&gt;
            &lt;div style="BORDER-RIGHT: white 2px solid; BORDER-TOP: white 2px solid; BORDER-LEFT: white 2px solid; BORDER-BOTTOM: white 2px solid"&gt;&lt;br /&gt;
            &lt;div style="BORDER-RIGHT: gray 4px solid; BORDER-TOP: gray 4px solid; FONT-WEIGHT: bold; FONT-SIZE: 15px; BORDER-LEFT: gray 4px solid; WIDTH: 100%; COLOR: gray; BORDER-BOTTOM: gray 4px solid; BACKGROUND-COLOR: silver; TEXT-ALIGN: center"&gt;&lt;br /&gt;
            &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/Default.aspx"&gt;Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c2_ASP.NET-Interview-Questions.aspx"&gt;ASP.NET Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c1_.NET-Interview-Questions.aspx"&gt;.NET Interview Questions &lt;/a&gt;&lt;br /&gt;
            &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c2_ASP.NET-Interview-Questions.aspx"&gt;ASP.NET 2.0 Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c1_.NET-Interview-Questions.aspx"&gt;.NET 2.0 Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/s23_SQL-Server-2005-Interview-Questions.aspx"&gt;SQL Server 2005 Interview Questions &lt;/a&gt;&lt;br /&gt;
            &lt;br /&gt;
            &lt;/div&gt;
            &lt;/div&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr align="center"&gt;
            &lt;td colspan="2"&gt;
            &lt;table id="Table9" width="100%" border="0" class="header"&gt;
                &lt;tbody&gt;
                    &lt;tr align="center"&gt;
                        &lt;td class="heading2" width="20%"&gt;VB.NET&lt;/td&gt;
                        &lt;td class="heading" width="60%"&gt;&lt;a name="arrays"&gt;&lt;/a&gt;
                        &lt;h3&gt;Arrays&lt;/h3&gt;
                        &lt;/td&gt;
                        &lt;td class="heading2" width="20%"&gt;C#&lt;/td&gt;
                    &lt;/tr&gt;
                &lt;/tbody&gt;
            &lt;/table&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr valign="top"&gt;
            &lt;td height="144"&gt;
            &lt;p&gt;Dim nums&lt;strong&gt;()&lt;/strong&gt; As Integer = {1, 2, 3} &lt;br /&gt;
            For i As Integer = 0 To nums.Length - 1 &lt;br /&gt;
              Console.WriteLine(nums(i)) &lt;br /&gt;
            Next &lt;br /&gt;
            &lt;br /&gt;
            &lt;span class="comment"&gt;' 4 is the index of the last element, so it holds 5 elements&lt;/span&gt;&lt;br /&gt;
            Dim names(4) As String &lt;br /&gt;
            names(0) = "David"&lt;br /&gt;
            names(5) = "Bobby"  &lt;span class="comment"&gt;' Throws System.IndexOutOfRangeException&lt;/span&gt; &lt;br /&gt;
            &lt;br /&gt;
            &lt;span class="comment"&gt;' Resize the array, keeping the existing values (Preserve is optional)&lt;/span&gt;&lt;br /&gt;
            &lt;strong&gt;ReDim Preserve&lt;/strong&gt; names(6)&lt;br /&gt;
            &lt;/p&gt;
            &lt;p&gt;&lt;br /&gt;
            &lt;br /&gt;
            Dim twoD(rows-1, cols-1) As Single &lt;br /&gt;
            twoD(2, 0) = 4.5&lt;br /&gt;
            &lt;br /&gt;
            Dim jagged&lt;strong&gt;()()&lt;/strong&gt; As Integer = { _ &lt;br /&gt;
              New Integer(4) {}, New Integer(1) {}, New Integer(2) {} } &lt;br /&gt;
            jagged(0)(4) = 5 &lt;/p&gt;
            &lt;/td&gt;
            &lt;td height="144"&gt;
            &lt;p&gt;int&lt;strong&gt;[] &lt;/strong&gt;nums = {1, 2, 3};&lt;br /&gt;
            for (int i = 0; i &amp;lt; nums.Length; i++)&lt;br /&gt;
              Console.WriteLine(nums[i]);&lt;br /&gt;
            &lt;br /&gt;
            &lt;br /&gt;
            &lt;span class="comment"&gt;// 5 is the size of the array&lt;/span&gt;&lt;br /&gt;
            string[] names = new string[5];&lt;br /&gt;
            names[0] = "David";&lt;br /&gt;
            names[5] = "Bobby";   &lt;span class="comment"&gt;// Throws System.IndexOutOfRangeException&lt;/span&gt; &lt;br /&gt;
            &lt;br /&gt;
            &lt;br /&gt;
            &lt;span class="comment"&gt;// C# can't dynamically resize an array.  Just copy into new array.&lt;/span&gt;&lt;br /&gt;
            string[] names2 = new string[7]; &lt;br /&gt;
            Array.Copy(names, names2, names.Length);   &lt;span class="comment"&gt;// or names.CopyTo(names2, 0);&lt;/span&gt; &lt;/p&gt;
            &lt;p&gt;float&lt;strong&gt;[,]&lt;/strong&gt; twoD = new float[rows, cols];&lt;br /&gt;
            twoD[2,0] = 4.5f;  &lt;/p&gt;
            &lt;p&gt;int&lt;strong&gt;[][]&lt;/strong&gt; jagged = new int[3][] { &lt;br /&gt;
              new int[5], new int[2], new int[3] };&lt;br /&gt;
            jagged[0][4] = 5; &lt;/p&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td colspan="2"&gt;
            &lt;div style="BORDER-RIGHT: white 2px solid; BORDER-TOP: white 2px solid; BORDER-LEFT: white 2px solid; BORDER-BOTTOM: white 2px solid"&gt;&lt;br /&gt;
            &lt;div style="BORDER-RIGHT: gray 4px solid; BORDER-TOP: gray 4px solid; FONT-WEIGHT: bold; FONT-SIZE: 15px; BORDER-LEFT: gray 4px solid; WIDTH: 100%; COLOR: gray; BORDER-BOTTOM: gray 4px solid; BACKGROUND-COLOR: silver; TEXT-ALIGN: center"&gt;&lt;br /&gt;
            &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/Default.aspx"&gt;Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c2_ASP.NET-Interview-Questions.aspx"&gt;ASP.NET Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c1_.NET-Interview-Questions.aspx"&gt;.NET Interview Questions &lt;/a&gt;&lt;br /&gt;
            &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c2_ASP.NET-Interview-Questions.aspx"&gt;ASP.NET 2.0 Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c1_.NET-Interview-Questions.aspx"&gt;.NET 2.0 Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/s23_SQL-Server-2005-Interview-Questions.aspx"&gt;SQL Server 2005 Interview Questions &lt;/a&gt;&lt;br /&gt;
            &lt;br /&gt;
            &lt;/div&gt;
            &lt;/div&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr align="center"&gt;
            &lt;td colspan="2"&gt;
            &lt;table id="Table10" width="100%" border="0" class="header"&gt;
                &lt;tbody&gt;
                    &lt;tr align="center"&gt;
                        &lt;td class="heading2" width="20%"&gt;VB.NET&lt;/td&gt;
                        &lt;td class="heading" width="60%"&gt;&lt;a name="functions"&gt;&lt;/a&gt;
                        &lt;h3&gt;Functions&lt;/h3&gt;
                        &lt;/td&gt;
                        &lt;td class="heading2" width="20%"&gt;C#&lt;/td&gt;
                    &lt;/tr&gt;
                &lt;/tbody&gt;
            &lt;/table&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr valign="top"&gt;
            &lt;td width="50%" height="100"&gt;
            &lt;p&gt;&lt;span class="comment"&gt;' Pass by value (in, default), reference (in/out), and reference (out)&lt;/span&gt;  &lt;br /&gt;
            &lt;strong&gt;Sub&lt;/strong&gt; TestFunction(&lt;strong&gt;ByVal&lt;/strong&gt; x As Integer, &lt;strong&gt;ByRef&lt;/strong&gt; y As Integer, &lt;strong&gt;ByRef&lt;/strong&gt; z As Integer)&lt;br /&gt;
              x += 1&lt;br /&gt;
              y += 1 &lt;br /&gt;
              z = 5 &lt;br /&gt;
            &lt;strong&gt;End Sub&lt;/strong&gt; &lt;/p&gt;
            &lt;p&gt;Dim a = 1, b = 1, c As Integer   &lt;span class="comment"&gt;' c set to zero by default&lt;/span&gt;  &lt;br /&gt;
            TestFunction(a, b, c) &lt;br /&gt;
            Console.WriteLine("{0} {1} {2}", a, b, c)   &lt;span class="comment"&gt;' 1 2 5&lt;/span&gt;&lt;/p&gt;
            &lt;p&gt;&lt;span class="comment"&gt;' Accept variable number of arguments&lt;/span&gt; &lt;br /&gt;
            &lt;strong&gt;Function&lt;/strong&gt; Sum(ByVal &lt;strong&gt;ParamArray&lt;/strong&gt; nums &lt;strong&gt;As&lt;/strong&gt; Integer()) As Integer &lt;br /&gt;
              Sum = 0  &lt;br /&gt;
              For Each i As Integer In nums &lt;br /&gt;
                Sum += i &lt;br /&gt;
              Next &lt;br /&gt;
            &lt;strong&gt;End Function&lt;/strong&gt;   &lt;span class="comment"&gt;' Or use Return statement like C#&lt;/span&gt;&lt;br /&gt;
            &lt;br /&gt;
            Dim total As Integer = Sum(4, 3, 2, 1)   &lt;span class="comment"&gt;' returns 10&lt;/span&gt;&lt;/p&gt;
            &lt;p&gt;&lt;span class="comment"&gt;' Optional parameters must be listed last and must have a default value&lt;/span&gt; &lt;br /&gt;
            &lt;strong&gt;Sub&lt;/strong&gt; SayHello(ByVal name As String, &lt;strong&gt;Optional&lt;/strong&gt; ByVal prefix As String = "")&lt;br /&gt;
              Console.WriteLine("Greetings, " &amp;amp; prefix &amp;amp; " " &amp;amp; name) &lt;br /&gt;
            &lt;strong&gt;End Sub&lt;/strong&gt;&lt;br /&gt;
            &lt;br /&gt;
            SayHello("Strangelove", "Dr.")&lt;br /&gt;
            SayHello("Madonna")&lt;br /&gt;
            &lt;/p&gt;
            &lt;span&gt;&lt;/span&gt;&lt;/td&gt;
            &lt;td width="50%" height="100"&gt;&lt;span class="comment"&gt;// Pass by value (in, default), reference (in/out), and reference (out)&lt;/span&gt;&lt;br /&gt;
            void TestFunction(int x, &lt;strong&gt;ref&lt;/strong&gt; int y, &lt;strong&gt;out&lt;/strong&gt; int z) {&lt;br /&gt;
              x++;  &lt;br /&gt;
              y++;&lt;br /&gt;
              z = 5;&lt;br /&gt;
            }
            &lt;p&gt;int a = 1, b = 1, c;  &lt;font color="#008000"&gt;&lt;em&gt;// c doesn't need initializing&lt;/em&gt;&lt;/font&gt;&lt;br /&gt;
            TestFunction(a, &lt;strong&gt;ref&lt;/strong&gt; b, &lt;strong&gt;out&lt;/strong&gt; c);&lt;br /&gt;
            Console.WriteLine("{0} {1} {2}", a, b, c);  &lt;span class="comment"&gt;// 1 2 5&lt;/span&gt;&lt;/p&gt;
            &lt;p&gt;&lt;span class="comment"&gt;// Accept variable number of arguments&lt;/span&gt;&lt;br /&gt;
            int Sum(&lt;strong&gt;params&lt;/strong&gt; int[] nums) {&lt;br /&gt;
              int sum = 0;&lt;br /&gt;
              foreach (int i in nums)&lt;br /&gt;
                sum += i;&lt;br /&gt;
              return sum;&lt;br /&gt;
            }&lt;/p&gt;
            &lt;p&gt;int total = Sum(4, 3, 2, 1);   &lt;font color="#008000"&gt;&lt;em&gt;// returns 10&lt;/em&gt;&lt;/font&gt;&lt;/p&gt;
            &lt;p&gt;&lt;span class="comment"&gt;/* C# doesn't support optional arguments/parameters.  Just create two different versions of the same function. */&lt;/span&gt;  &lt;br /&gt;
            void SayHello(string name, string prefix) {&lt;br /&gt;
              Console.WriteLine("Greetings, " + prefix + " " + name);&lt;br /&gt;
            } &lt;br /&gt;
            &lt;br /&gt;
            void SayHello(string name) { &lt;br /&gt;
              SayHello(name, ""); &lt;br /&gt;
            } &lt;/p&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td colspan="2"&gt;
            &lt;div style="BORDER-RIGHT: white 2px solid; BORDER-TOP: white 2px solid; BORDER-LEFT: white 2px solid; BORDER-BOTTOM: white 2px solid"&gt;&lt;br /&gt;
            &lt;div style="BORDER-RIGHT: gray 4px solid; BORDER-TOP: gray 4px solid; FONT-WEIGHT: bold; FONT-SIZE: 15px; BORDER-LEFT: gray 4px solid; WIDTH: 100%; COLOR: gray; BORDER-BOTTOM: gray 4px solid; BACKGROUND-COLOR: silver; TEXT-ALIGN: center"&gt;&lt;br /&gt;
            &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/Default.aspx"&gt;Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c2_ASP.NET-Interview-Questions.aspx"&gt;ASP.NET Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c1_.NET-Interview-Questions.aspx"&gt;.NET Interview Questions &lt;/a&gt;&lt;br /&gt;
            &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c2_ASP.NET-Interview-Questions.aspx"&gt;ASP.NET 2.0 Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c1_.NET-Interview-Questions.aspx"&gt;.NET 2.0 Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/s23_SQL-Server-2005-Interview-Questions.aspx"&gt;SQL Server 2005 Interview Questions &lt;/a&gt;&lt;br /&gt;
            &lt;br /&gt;
            &lt;/div&gt;
            &lt;/div&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr align="center"&gt;
            &lt;td colspan="2"&gt;
            &lt;table id="Table11" width="100%" border="0" class="header"&gt;
                &lt;tbody&gt;
                    &lt;tr align="center"&gt;
                        &lt;td class="heading2" width="20%"&gt;VB.NET&lt;/td&gt;
                        &lt;td class="heading" width="60%"&gt;&lt;a name="strings"&gt;&lt;/a&gt;
                        &lt;h3&gt;Strings&lt;/h3&gt;
                        &lt;/td&gt;
                        &lt;td class="heading2" width="20%"&gt;C#&lt;/td&gt;
                    &lt;/tr&gt;
                &lt;/tbody&gt;
            &lt;/table&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td valign="top"&gt;
            &lt;p&gt;&lt;span class="comment"&gt;Special character constants&lt;/span&gt;&lt;br /&gt;
            vbCrLf, vbCr, vbLf, vbNewLine &lt;br /&gt;
            vbNullString &lt;br /&gt;
            vbTab &lt;br /&gt;
            vbBack &lt;br /&gt;
            vbFormFeed &lt;br /&gt;
            vbVerticalTab&lt;br /&gt;
            "" &lt;/p&gt;
            &lt;p&gt;&lt;span class="comment"&gt;' String concatenation (use &amp;amp; or +)&lt;/span&gt; &lt;br /&gt;
            Dim school As String = "Harding" &lt;strong&gt;&amp;amp;&lt;/strong&gt; vbTab&lt;br /&gt;
            school = school &amp;amp; "University" &lt;span class="comment"&gt;' school is "Harding (tab) University"&lt;/span&gt; &lt;/p&gt;
            &lt;p&gt;&lt;span class="comment"&gt;' Chars&lt;/span&gt;&lt;br /&gt;
            Dim letter As &lt;strong&gt;Char&lt;/strong&gt; = school.Chars(0)   &lt;span class="comment"&gt;' letter is H &lt;/span&gt;&lt;br /&gt;
            letter = Convert.ToChar(65)                &lt;span class="comment"&gt;' letter is A &lt;/span&gt;&lt;br /&gt;
            letter = &lt;strong&gt;Chr&lt;/strong&gt;(65)                                 &lt;span class="comment"&gt;' same thing &lt;br /&gt;
            &lt;/span&gt;Dim word() As Char = school.ToCharArray() &lt;span class="comment"&gt;' word holds Harding &lt;/span&gt;&lt;/p&gt;
            &lt;p&gt;&lt;span class="comment"&gt;' No string literal operator&lt;/span&gt;  &lt;br /&gt;
            Dim msg As String = "File is c:\temp\x.dat" &lt;br /&gt;
            &lt;br /&gt;
            &lt;br /&gt;
            &lt;br /&gt;
            &lt;/p&gt;
            &lt;p&gt;&lt;span class="comment"&gt;' String comparison&lt;/span&gt;&lt;br /&gt;
            Dim mascot As String = "Bisons"&lt;br /&gt;
            If (mascot = "Bisons") Then   &lt;span class="comment"&gt;' true&lt;/span&gt;&lt;br /&gt;
            If (mascot.&lt;strong&gt;Equals&lt;/strong&gt;("Bisons")) Then   &lt;span class="comment"&gt;' true&lt;/span&gt;&lt;br /&gt;
            If (mascot.&lt;strong&gt;ToUpper&lt;/strong&gt;().&lt;strong&gt;Equals&lt;/strong&gt;("BISONS")) Then  &lt;span class="comment"&gt;' true&lt;/span&gt;&lt;br /&gt;
            If (mascot.&lt;strong&gt;CompareTo&lt;/strong&gt;("Bisons") = 0) Then   &lt;span class="comment"&gt;' true&lt;/span&gt;&lt;/p&gt;
            &lt;p&gt;Console.WriteLine(mascot.Substring(2, 3)) &lt;span class="comment"&gt;' Prints "son"&lt;/span&gt; &lt;/p&gt;
            &lt;p&gt;&lt;span class="comment"&gt;' String matching&lt;/span&gt;&lt;br /&gt;
            If ("John 3:16" &lt;strong&gt;Like&lt;/strong&gt; "Jo[Hh]? #:*") Then   &lt;span class="comment"&gt;'true&lt;/span&gt; &lt;br /&gt;
            &lt;br /&gt;
            Imports System.Text.RegularExpressions   &lt;span class="comment"&gt;' More powerful than Like&lt;/span&gt;&lt;br /&gt;
            Dim r As New &lt;strong&gt;Regex&lt;/strong&gt;("Jo[hH]. \d:*")&lt;br /&gt;
            If (r.Match("John 3:16").Success) Then   &lt;span class="comment"&gt;'true&lt;/span&gt; &lt;/p&gt;
            &lt;p&gt;&lt;span class="comment"&gt;' My birthday: Oct 12, 1973&lt;/span&gt;&lt;br /&gt;
            Dim dt As New DateTime(1973, 10, 12)&lt;br /&gt;
            Dim s As String = "My birthday: " &amp;amp; dt.ToString("MMM dd, yyyy") &lt;/p&gt;
            &lt;p&gt;&lt;span class="comment"&gt;' Mutable string &lt;br /&gt;
            &lt;/span&gt;Dim buffer As New System.Text.&lt;strong&gt;StringBuilder&lt;/strong&gt;("two ")&lt;br /&gt;
            buffer.Append("three ")&lt;br /&gt;
            buffer.Insert(0, "one ")&lt;br /&gt;
            buffer.Replace("two", "TWO")&lt;br /&gt;
            Console.WriteLine(buffer)         &lt;span class="comment"&gt;' Prints "one TWO three"&lt;/span&gt; &lt;/p&gt;
            &lt;/td&gt;
            &lt;td valign="top"&gt;
            &lt;p&gt;&lt;span class="comment"&gt;Escape sequences&lt;/span&gt;&lt;br /&gt;
            \r    &lt;span class="comment"&gt;// carriage-return&lt;/span&gt;&lt;br /&gt;
            \n    &lt;span class="comment"&gt;// line-feed&lt;/span&gt;&lt;br /&gt;
            \t    &lt;span class="comment"&gt;// tab&lt;/span&gt;&lt;br /&gt;
            \\    &lt;span class="comment"&gt;// backslash&lt;/span&gt;&lt;br /&gt;
            \"    &lt;span class="comment"&gt;// quote&lt;/span&gt; &lt;br /&gt;
            &lt;br /&gt;
            &lt;br /&gt;
            &lt;br /&gt;
            &lt;br /&gt;
            &lt;/p&gt;
            &lt;p&gt;&lt;span class="comment"&gt;// String concatenation&lt;/span&gt;&lt;br /&gt;
            &lt;strong&gt;string&lt;/strong&gt; school = "Harding\t"; &lt;br /&gt;
            school = school + "University";   &lt;span class="comment"&gt;// school is "Harding (tab) University"&lt;/span&gt;&lt;/p&gt;
            &lt;p&gt;&lt;span class="comment"&gt;// Chars&lt;/span&gt;&lt;br /&gt;
            &lt;strong&gt;char&lt;/strong&gt; letter = school[0];            &lt;span class="comment"&gt;// letter is H&lt;/span&gt; &lt;br /&gt;
            letter = Convert.ToChar(65);     &lt;span class="comment"&gt;// letter is A&lt;/span&gt; &lt;br /&gt;
            letter = &lt;strong&gt;(char)&lt;/strong&gt;65;                    &lt;span class="comment"&gt;// same thing &lt;br /&gt;
            &lt;/span&gt;&lt;strong&gt;char[]&lt;/strong&gt; word = school.ToCharArray();   &lt;span class="comment"&gt;// word holds Harding&lt;/span&gt; &lt;/p&gt;
            &lt;p&gt;&lt;span class="comment"&gt;// String literal&lt;/span&gt; &lt;br /&gt;
            string msg = &lt;strong&gt;@&lt;/strong&gt;"File is c:\temp\x.dat"; &lt;br /&gt;
            &lt;span class="comment"&gt;// same as&lt;/span&gt; &lt;br /&gt;
            string msg = "File is c:\\temp\\x.dat"; &lt;br /&gt;
            &lt;/p&gt;
            &lt;p&gt;&lt;span class="comment"&gt;// String comparison&lt;/span&gt;&lt;br /&gt;
            string mascot = "Bisons"; &lt;br /&gt;
            if (mascot == "Bisons")    &lt;span class="comment"&gt;// true&lt;/span&gt;&lt;br /&gt;
            if (mascot.&lt;strong&gt;Equals&lt;/strong&gt;("Bisons"))   &lt;span class="comment"&gt;// true&lt;/span&gt;&lt;br /&gt;
            if (mascot.&lt;strong&gt;ToUpper&lt;/strong&gt;().&lt;strong&gt;Equals&lt;/strong&gt;("BISONS"))   &lt;span class="comment"&gt;// true&lt;/span&gt;&lt;br /&gt;
            if (mascot.&lt;strong&gt;CompareTo&lt;/strong&gt;("Bisons") == 0)    &lt;span class="comment"&gt;// true&lt;/span&gt;&lt;/p&gt;
            &lt;p&gt;Console.WriteLine(mascot.&lt;strong&gt;Substring&lt;/strong&gt;(2, 3));    &lt;span class="comment"&gt;// Prints "son"&lt;/span&gt;&lt;/p&gt;
            &lt;p&gt;&lt;span class="comment"&gt;// String matching&lt;br /&gt;
            // No Like equivalent - use regular expressions&lt;/span&gt; &lt;br /&gt;
            &lt;br /&gt;
            using System.Text.RegularExpressions;&lt;br /&gt;
            &lt;strong&gt;Regex&lt;/strong&gt; r = new &lt;strong&gt;Regex&lt;/strong&gt;(@"Jo[hH]. \d:*");&lt;br /&gt;
            if (r.Match("John 3:16").Success)   &lt;span class="comment"&gt;// true&lt;/span&gt; &lt;/p&gt;
            &lt;p&gt;&lt;span class="comment"&gt;// My birthday: Oct 12, 1973&lt;/span&gt;&lt;br /&gt;
            DateTime dt = new DateTime(1973, 10, 12);&lt;br /&gt;
            string s = "My birthday: " + dt.ToString("MMM dd, yyyy"); &lt;/p&gt;
            &lt;p&gt;&lt;span class="comment"&gt;// Mutable string&lt;/span&gt; &lt;br /&gt;
            System.Text.&lt;strong&gt;StringBuilder&lt;/strong&gt; buffer = new System.Text.&lt;strong&gt;StringBuilder&lt;/strong&gt;("two "); &lt;br /&gt;
            buffer.&lt;strong&gt;Append&lt;/strong&gt;("three "); &lt;br /&gt;
            buffer.&lt;strong&gt;Insert&lt;/strong&gt;(0, "one "); &lt;br /&gt;
            buffer.&lt;strong&gt;Replace&lt;/strong&gt;("two", "TWO"); &lt;br /&gt;
            Console.WriteLine(buffer);     &lt;span class="comment"&gt;// Prints "one TWO three"&lt;/span&gt;&lt;/p&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td colspan="2"&gt;
            &lt;div style="BORDER-RIGHT: white 2px solid; BORDER-TOP: white 2px solid; BORDER-LEFT: white 2px solid; BORDER-BOTTOM: white 2px solid"&gt;&lt;br /&gt;
            &lt;div style="BORDER-RIGHT: gray 4px solid; BORDER-TOP: gray 4px solid; FONT-WEIGHT: bold; FONT-SIZE: 15px; BORDER-LEFT: gray 4px solid; WIDTH: 100%; COLOR: gray; BORDER-BOTTOM: gray 4px solid; BACKGROUND-COLOR: silver; TEXT-ALIGN: center"&gt;&lt;br /&gt;
            &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/Default.aspx"&gt;Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c2_ASP.NET-Interview-Questions.aspx"&gt;ASP.NET Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c1_.NET-Interview-Questions.aspx"&gt;.NET Interview Questions &lt;/a&gt;&lt;br /&gt;
            &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c2_ASP.NET-Interview-Questions.aspx"&gt;ASP.NET 2.0 Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c1_.NET-Interview-Questions.aspx"&gt;.NET 2.0 Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/s23_SQL-Server-2005-Interview-Questions.aspx"&gt;SQL Server 2005 Interview Questions &lt;/a&gt;&lt;br /&gt;
            &lt;br /&gt;
            &lt;/div&gt;
            &lt;/div&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr align="center"&gt;
            &lt;td colspan="2"&gt;
            &lt;table id="Table12" width="100%" border="0" class="header"&gt;
                &lt;tbody&gt;
                    &lt;tr align="center"&gt;
                        &lt;td class="heading2" width="20%"&gt;VB.NET&lt;/td&gt;
                        &lt;td class="heading" width="60%"&gt;&lt;a name="exceptionhandling"&gt;&lt;/a&gt;
                        &lt;h3&gt;Exception Handling&lt;/h3&gt;
                        &lt;/td&gt;
                        &lt;td class="heading2" width="20%"&gt;C#&lt;/td&gt;
                    &lt;/tr&gt;
                &lt;/tbody&gt;
            &lt;/table&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr valign="top"&gt;
            &lt;td height="96"&gt;
            &lt;p&gt;&lt;span class="comment"&gt;' Throw an exception&lt;/span&gt;&lt;br /&gt;
            Dim ex As New Exception("Something is really wrong.") &lt;br /&gt;
            &lt;strong&gt;Throw&lt;/strong&gt;  ex  &lt;/p&gt;
            &lt;p&gt;&lt;span class="comment"&gt;' Catch an exception&lt;/span&gt;&lt;br /&gt;
            &lt;strong&gt;Try&lt;/strong&gt; &lt;br /&gt;
              y = 0&lt;br /&gt;
              x = 10 / y&lt;br /&gt;
            &lt;strong&gt;Catch&lt;/strong&gt; ex As Exception &lt;strong&gt;When&lt;/strong&gt; y = 0 &lt;span class="comment"&gt;' Argument and When is optional&lt;/span&gt;&lt;br /&gt;
              Console.WriteLine(ex.Message) &lt;br /&gt;
            &lt;strong&gt;Finally&lt;/strong&gt; &lt;br /&gt;
              Beep() &lt;br /&gt;
            &lt;strong&gt;End Try&lt;br /&gt;
            &lt;/strong&gt;&lt;/p&gt;
            &lt;p&gt;&lt;span class="comment"&gt;' Deprecated unstructured error handling&lt;/span&gt;&lt;br /&gt;
            &lt;strong&gt;On&lt;/strong&gt; Error &lt;strong&gt;GoTo&lt;/strong&gt; MyErrorHandler&lt;br /&gt;
            ...&lt;br /&gt;
            MyErrorHandler: Console.WriteLine(Err.Description)&lt;br /&gt;
            &lt;/p&gt;
            &lt;/td&gt;
            &lt;td height="96"&gt;
            &lt;p&gt;&lt;span class="comment"&gt;// Throw an exception&lt;/span&gt;&lt;br /&gt;
            Exception up = new Exception("Something is really wrong."); &lt;br /&gt;
            &lt;strong&gt;throw&lt;/strong&gt; up;  &lt;span class="comment"&gt;// ha ha &lt;/span&gt;&lt;/p&gt;
            &lt;p&gt;&lt;span class="comment"&gt;// Catch an exception&lt;/span&gt;&lt;br /&gt;
            &lt;strong&gt;try&lt;/strong&gt; { &lt;br /&gt;
              y = 0; &lt;br /&gt;
              x = 10 / y; &lt;br /&gt;
            } &lt;br /&gt;
            &lt;strong&gt;catch&lt;/strong&gt; (Exception ex) {   &lt;span class="comment"&gt;// Argument is optional, no "When" keyword&lt;/span&gt; &lt;br /&gt;
              Console.WriteLine(ex.Message); &lt;br /&gt;
            } &lt;br /&gt;
            &lt;strong&gt;finally&lt;/strong&gt; { &lt;br /&gt;
              &lt;span class="comment"&gt;// Requires reference to the Microsoft.VisualBasic.dll &lt;br /&gt;
              // assembly (pre .NET Framework v2.0)&lt;/span&gt; &lt;br /&gt;
              Microsoft.VisualBasic.Interaction.Beep(); &lt;br /&gt;
            } &lt;/p&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td colspan="2"&gt;
            &lt;div style="BORDER-RIGHT: white 2px solid; BORDER-TOP: white 2px solid; BORDER-LEFT: white 2px solid; BORDER-BOTTOM: white 2px solid"&gt;&lt;br /&gt;
            &lt;div style="BORDER-RIGHT: gray 4px solid; BORDER-TOP: gray 4px solid; FONT-WEIGHT: bold; FONT-SIZE: 15px; BORDER-LEFT: gray 4px solid; WIDTH: 100%; COLOR: gray; BORDER-BOTTOM: gray 4px solid; BACKGROUND-COLOR: silver; TEXT-ALIGN: center"&gt;&lt;br /&gt;
            &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/Default.aspx"&gt;Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c2_ASP.NET-Interview-Questions.aspx"&gt;ASP.NET Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c1_.NET-Interview-Questions.aspx"&gt;.NET Interview Questions &lt;/a&gt;&lt;br /&gt;
            &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c2_ASP.NET-Interview-Questions.aspx"&gt;ASP.NET 2.0 Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c1_.NET-Interview-Questions.aspx"&gt;.NET 2.0 Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/s23_SQL-Server-2005-Interview-Questions.aspx"&gt;SQL Server 2005 Interview Questions &lt;/a&gt;&lt;br /&gt;
            &lt;br /&gt;
            &lt;/div&gt;
            &lt;/div&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr align="center"&gt;
            &lt;td colspan="2"&gt;
            &lt;table id="Table13" width="100%" border="0" class="header"&gt;
                &lt;tbody&gt;
                    &lt;tr align="center"&gt;
                        &lt;td class="heading2" width="20%"&gt;VB.NET&lt;/td&gt;
                        &lt;td class="heading" width="60%"&gt;&lt;a name="namespaces"&gt;&lt;/a&gt;
                        &lt;h3&gt;Namespaces&lt;/h3&gt;
                        &lt;/td&gt;
                        &lt;td class="heading2" width="20%"&gt;C#&lt;/td&gt;
                    &lt;/tr&gt;
                &lt;/tbody&gt;
            &lt;/table&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr valign="top"&gt;
            &lt;td height="163"&gt;
            &lt;p&gt;&lt;strong&gt;Namespace&lt;/strong&gt; MyCompany.Product &lt;br /&gt;
              ...&lt;br /&gt;
            &lt;strong&gt;End Namespace&lt;/strong&gt;&lt;/p&gt;
            &lt;p&gt;&lt;span class="comment"&gt;' or&lt;/span&gt;&lt;/p&gt;
            &lt;p&gt;&lt;strong&gt;Namespace&lt;/strong&gt; MyCompany&lt;br /&gt;
              &lt;strong&gt;Namespace&lt;/strong&gt; Product &lt;br /&gt;
               &lt;br /&gt;
                  ...&lt;br /&gt;
               &lt;br /&gt;
              &lt;strong&gt;End Namespace &lt;br /&gt;
            End Namespace&lt;/strong&gt;&lt;/p&gt;
            &lt;p&gt;&lt;strong&gt;Imports&lt;/strong&gt; MyCompany.Product &lt;/p&gt;
            &lt;/td&gt;
            &lt;td height="163"&gt;
            &lt;p&gt;&lt;strong&gt;namespace&lt;/strong&gt; MyCompany.Product {&lt;br /&gt;
              ...&lt;br /&gt;
            } &lt;/p&gt;
            &lt;p&gt;&lt;span class="comment"&gt;// or&lt;/span&gt; &lt;/p&gt;
            &lt;p&gt;&lt;strong&gt;namespace&lt;/strong&gt; MyCompany{&lt;br /&gt;
              &lt;strong&gt;namespace&lt;/strong&gt; Product {&lt;br /&gt;
                &lt;br /&gt;
                  ...&lt;br /&gt;
                &lt;br /&gt;
              }&lt;br /&gt;
            } &lt;/p&gt;
            &lt;p&gt;&lt;strong&gt;using&lt;/strong&gt; MyCompany.Product; &lt;/p&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td colspan="2"&gt;
            &lt;div style="BORDER-RIGHT: white 2px solid; BORDER-TOP: white 2px solid; BORDER-LEFT: white 2px solid; BORDER-BOTTOM: white 2px solid"&gt;&lt;br /&gt;
            &lt;div style="BORDER-RIGHT: gray 4px solid; BORDER-TOP: gray 4px solid; FONT-WEIGHT: bold; FONT-SIZE: 15px; BORDER-LEFT: gray 4px solid; WIDTH: 100%; COLOR: gray; BORDER-BOTTOM: gray 4px solid; BACKGROUND-COLOR: silver; TEXT-ALIGN: center"&gt;&lt;br /&gt;
            &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/Default.aspx"&gt;Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c2_ASP.NET-Interview-Questions.aspx"&gt;ASP.NET Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c1_.NET-Interview-Questions.aspx"&gt;.NET Interview Questions &lt;/a&gt;&lt;br /&gt;
            &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c2_ASP.NET-Interview-Questions.aspx"&gt;ASP.NET 2.0 Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c1_.NET-Interview-Questions.aspx"&gt;.NET 2.0 Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/s23_SQL-Server-2005-Interview-Questions.aspx"&gt;SQL Server 2005 Interview Questions &lt;/a&gt;&lt;br /&gt;
            &lt;br /&gt;
            &lt;/div&gt;
            &lt;/div&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr align="center"&gt;
            &lt;td colspan="2"&gt;
            &lt;table id="Table14" width="100%" border="0" class="header"&gt;
                &lt;tbody&gt;
                    &lt;tr align="center"&gt;
                        &lt;td class="heading2" width="20%"&gt;VB.NET&lt;/td&gt;
                        &lt;td class="heading" width="60%"&gt;&lt;a name="classesinterfaces"&gt;&lt;/a&gt;
                        &lt;h3&gt;Classes / Interfaces&lt;/h3&gt;
                        &lt;/td&gt;
                        &lt;td class="heading2" width="20%"&gt;C#&lt;/td&gt;
                    &lt;/tr&gt;
                &lt;/tbody&gt;
            &lt;/table&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr valign="top"&gt;
            &lt;td height="163"&gt;
            &lt;p&gt;&lt;span class="comment"&gt;Accessibility keywords&lt;/span&gt; &lt;br /&gt;
            &lt;a href="http://msdn2.microsoft.com/en-us/library/9dc6we3z(VS.71).aspx"&gt;Public&lt;/a&gt;&lt;br /&gt;
            &lt;a href="http://msdn2.microsoft.com/en-us/library/wx059ey1(VS.71).aspx"&gt;Private&lt;/a&gt;&lt;br /&gt;
            &lt;a href="http://msdn2.microsoft.com/en-us/library/08w05ey2(VS.71).aspx"&gt;Friend&lt;/a&gt;                    &lt;br /&gt;
            &lt;a href="http://msdn2.microsoft.com/en-us/library/8050kawf(VS.71).aspx"&gt;Protected&lt;/a&gt;&lt;br /&gt;
            Protected Friend&lt;br /&gt;
            &lt;a href="http://msdn2.microsoft.com/en-us/library/zc2b427x(VS.71).aspx"&gt;Shared&lt;/a&gt;&lt;/p&gt;
            &lt;p&gt;&lt;span class="comment"&gt;' Inheritance&lt;/span&gt;&lt;br /&gt;
            &lt;strong&gt;Class&lt;/strong&gt; Game&lt;br /&gt;
              &lt;strong&gt;Inherits&lt;/strong&gt; Competition&lt;br /&gt;
              ...&lt;br /&gt;
            &lt;strong&gt;End Class&lt;/strong&gt; &lt;/p&gt;
            &lt;p&gt;&lt;span class="comment"&gt;' Interface definition&lt;/span&gt;&lt;br /&gt;
            &lt;strong&gt;Interface&lt;/strong&gt; IAlarmClock &lt;br /&gt;
              ...&lt;br /&gt;
            &lt;strong&gt;End Interface&lt;/strong&gt;&lt;/p&gt;
            &lt;p&gt;&lt;span class="comment"&gt;// Extending an interface &lt;/span&gt;&lt;br /&gt;
            &lt;strong&gt;Interface&lt;/strong&gt; IAlarmClock &lt;br /&gt;
              &lt;strong&gt;Inherits&lt;/strong&gt; IClock&lt;br /&gt;
              ...&lt;br /&gt;
            &lt;strong&gt;End Interface&lt;/strong&gt;&lt;/p&gt;
            &lt;p&gt;&lt;span class="comment"&gt;// Interface implementation&lt;/span&gt;&lt;br /&gt;
            &lt;strong&gt;Class&lt;/strong&gt; WristWatch &lt;br /&gt;
              &lt;strong&gt;Implements&lt;/strong&gt; IAlarmClock, ITimer &lt;br /&gt;
               ...&lt;br /&gt;
            &lt;strong&gt;End Class&lt;/strong&gt; &lt;/p&gt;
            &lt;/td&gt;
            &lt;td height="163"&gt;
            &lt;p&gt;&lt;span class="comment"&gt;Accessibility keywords&lt;/span&gt; &lt;br /&gt;
            &lt;a href="http://msdn2.microsoft.com/en-us/library/yzh058ae(VS.71).aspx"&gt;public&lt;/a&gt;&lt;br /&gt;
            &lt;a href="http://msdn2.microsoft.com/en-us/library/st6sy9xe(VS.71).aspx"&gt;private&lt;/a&gt;&lt;br /&gt;
            &lt;a href="http://msdn2.microsoft.com/en-us/library/7c5ka91b(VS.71).aspx"&gt;internal&lt;/a&gt;&lt;br /&gt;
            &lt;a href="http://msdn2.microsoft.com/en-us/library/bcd5672a(VS.71).aspx"&gt;protected&lt;/a&gt;&lt;br /&gt;
            protected internal&lt;br /&gt;
            &lt;a href="http://msdn2.microsoft.com/en-us/library/98f28cdx(VS.71).aspx"&gt;static&lt;/a&gt;&lt;/p&gt;
            &lt;p&gt;&lt;span class="comment"&gt;// Inheritance&lt;/span&gt;&lt;br /&gt;
            &lt;strong&gt;class&lt;/strong&gt; Game &lt;strong&gt;:&lt;/strong&gt; Competition {&lt;br /&gt;
              ...&lt;br /&gt;
            } &lt;/p&gt;
            &lt;p&gt;&lt;span class="comment"&gt;&lt;br /&gt;
            // Interface definition&lt;/span&gt;&lt;br /&gt;
            &lt;strong&gt;interface&lt;/strong&gt; IAlarmClock {&lt;br /&gt;
              ...&lt;br /&gt;
            } &lt;/p&gt;
            &lt;p&gt;&lt;span class="comment"&gt;// Extending an interface &lt;/span&gt;&lt;br /&gt;
            &lt;strong&gt;interface&lt;/strong&gt; IAlarmClock &lt;strong&gt;:&lt;/strong&gt; IClock {&lt;br /&gt;
              ...&lt;br /&gt;
            } &lt;/p&gt;
            &lt;p&gt;&lt;span class="comment"&gt;&lt;br /&gt;
            // Interface implementation&lt;/span&gt;&lt;br /&gt;
            &lt;strong&gt;class&lt;/strong&gt; WristWatch &lt;strong&gt;:&lt;/strong&gt; IAlarmClock, ITimer {&lt;br /&gt;
               ...&lt;br /&gt;
            } &lt;/p&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td colspan="2"&gt;
            &lt;div style="BORDER-RIGHT: white 2px solid; BORDER-TOP: white 2px solid; BORDER-LEFT: white 2px solid; BORDER-BOTTOM: white 2px solid"&gt;&lt;br /&gt;
            &lt;div style="BORDER-RIGHT: gray 4px solid; BORDER-TOP: gray 4px solid; FONT-WEIGHT: bold; FONT-SIZE: 15px; BORDER-LEFT: gray 4px solid; WIDTH: 100%; COLOR: gray; BORDER-BOTTOM: gray 4px solid; BACKGROUND-COLOR: silver; TEXT-ALIGN: center"&gt;&lt;br /&gt;
            &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/Default.aspx"&gt;Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c2_ASP.NET-Interview-Questions.aspx"&gt;ASP.NET Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c1_.NET-Interview-Questions.aspx"&gt;.NET Interview Questions &lt;/a&gt;&lt;br /&gt;
            &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c2_ASP.NET-Interview-Questions.aspx"&gt;ASP.NET 2.0 Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c1_.NET-Interview-Questions.aspx"&gt;.NET 2.0 Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/s23_SQL-Server-2005-Interview-Questions.aspx"&gt;SQL Server 2005 Interview Questions &lt;/a&gt;&lt;br /&gt;
            &lt;br /&gt;
            &lt;/div&gt;
            &lt;/div&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr align="center"&gt;
            &lt;td colspan="2"&gt;
            &lt;table id="Table15" width="100%" border="0" class="header"&gt;
                &lt;tbody&gt;
                    &lt;tr align="center"&gt;
                        &lt;td class="heading2" width="20%"&gt;VB.NET&lt;/td&gt;
                        &lt;td class="heading" width="60%"&gt;&lt;a name="constructorsdestructors"&gt;&lt;/a&gt;
                        &lt;h3&gt;Constructors / Destructors&lt;/h3&gt;
                        &lt;/td&gt;
                        &lt;td class="heading2" width="20%"&gt;C#&lt;/td&gt;
                    &lt;/tr&gt;
                &lt;/tbody&gt;
            &lt;/table&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr valign="top"&gt;
            &lt;td height="176"&gt;&lt;strong&gt;Class&lt;/strong&gt; SuperHero&lt;br /&gt;
              Private _powerLevel As Integer &lt;br /&gt;
            &lt;br /&gt;
              Public Sub &lt;strong&gt;New&lt;/strong&gt;() &lt;br /&gt;
                _powerLevel = 0 &lt;br /&gt;
              End Sub &lt;br /&gt;
            &lt;br /&gt;
              Public Sub &lt;strong&gt;New&lt;/strong&gt;(ByVal powerLevel As Integer) &lt;br /&gt;
                Me._powerLevel = powerLevel &lt;br /&gt;
              End Sub&lt;br /&gt;
            &lt;br /&gt;
              Protected Overrides Sub &lt;strong&gt;Finalize&lt;/strong&gt;() &lt;br /&gt;
               &lt;span class="comment"&gt;' Desctructor code to free unmanaged resources&lt;/span&gt; &lt;br /&gt;
                MyBase.Finalize() &lt;br /&gt;
              End Sub&lt;br /&gt;
            &lt;strong&gt;End Class&lt;/strong&gt; &lt;/td&gt;
            &lt;td height="176"&gt;
            &lt;p&gt;&lt;strong&gt;class&lt;/strong&gt; SuperHero {&lt;br /&gt;
              private int _powerLevel;&lt;br /&gt;
            &lt;br /&gt;
              public SuperHero() {&lt;br /&gt;
                 _powerLevel = 0;&lt;br /&gt;
              }&lt;br /&gt;
            &lt;br /&gt;
              public SuperHero(int powerLevel) {&lt;br /&gt;
                this._powerLevel= powerLevel; &lt;br /&gt;
              }&lt;br /&gt;
            &lt;br /&gt;
              &lt;strong&gt;~&lt;/strong&gt;SuperHero() {&lt;br /&gt;
                &lt;span class="comment"&gt;// Destructor code to free unmanaged resources.&lt;br /&gt;
                // Implicitly creates a Finalize method&lt;/span&gt;&lt;br /&gt;
              }&lt;br /&gt;
            }&lt;/p&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td colspan="2"&gt;
            &lt;div style="BORDER-RIGHT: white 2px solid; BORDER-TOP: white 2px solid; BORDER-LEFT: white 2px solid; BORDER-BOTTOM: white 2px solid"&gt;&lt;br /&gt;
            &lt;div style="BORDER-RIGHT: gray 4px solid; BORDER-TOP: gray 4px solid; FONT-WEIGHT: bold; FONT-SIZE: 15px; BORDER-LEFT: gray 4px solid; WIDTH: 100%; COLOR: gray; BORDER-BOTTOM: gray 4px solid; BACKGROUND-COLOR: silver; TEXT-ALIGN: center"&gt;&lt;br /&gt;
            &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/Default.aspx"&gt;Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c2_ASP.NET-Interview-Questions.aspx"&gt;ASP.NET Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c1_.NET-Interview-Questions.aspx"&gt;.NET Interview Questions &lt;/a&gt;&lt;br /&gt;
            &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c2_ASP.NET-Interview-Questions.aspx"&gt;ASP.NET 2.0 Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c1_.NET-Interview-Questions.aspx"&gt;.NET 2.0 Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/s23_SQL-Server-2005-Interview-Questions.aspx"&gt;SQL Server 2005 Interview Questions &lt;/a&gt;&lt;br /&gt;
            &lt;br /&gt;
            &lt;/div&gt;
            &lt;/div&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr align="center"&gt;
            &lt;td colspan="2"&gt;
            &lt;table id="Table16" width="100%" border="0" class="header"&gt;
                &lt;tbody&gt;
                    &lt;tr align="center"&gt;
                        &lt;td class="heading2" width="20%"&gt;VB.NET&lt;/td&gt;
                        &lt;td class="heading" width="60%"&gt;&lt;a name="objects"&gt;&lt;/a&gt;
                        &lt;h3&gt;Using Objects&lt;/h3&gt;
                        &lt;/td&gt;
                        &lt;td class="heading2" width="20%"&gt;C#&lt;/td&gt;
                    &lt;/tr&gt;
                &lt;/tbody&gt;
            &lt;/table&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr valign="top"&gt;
            &lt;td height="163"&gt;
            &lt;p&gt;Dim hero As SuperHero = New SuperHero&lt;br /&gt;
            &lt;span class="comment"&gt;' or&lt;/span&gt;&lt;br /&gt;
            Dim hero As New SuperHero &lt;/p&gt;
            &lt;p&gt;&lt;strong&gt;With&lt;/strong&gt; hero &lt;br /&gt;
              .Name = "SpamMan" &lt;br /&gt;
              .PowerLevel = 3 &lt;br /&gt;
            &lt;strong&gt;End With&lt;/strong&gt; &lt;br /&gt;
            &lt;/p&gt;
            &lt;p&gt;hero.Defend("Laura Jones") &lt;br /&gt;
            hero.Rest()     &lt;span class="comment"&gt;' Calling Shared method&lt;/span&gt;&lt;br /&gt;
            &lt;span class="comment"&gt;' or&lt;/span&gt;&lt;br /&gt;
            SuperHero.Rest() &lt;/p&gt;
            &lt;p&gt;Dim hero2 As SuperHero = hero  &lt;span class="comment"&gt;' Both reference the same object&lt;/span&gt; &lt;br /&gt;
            hero2.Name = "WormWoman" &lt;br /&gt;
            Console.WriteLine(hero.Name)   &lt;span class="comment"&gt;' Prints WormWoman&lt;/span&gt;&lt;/p&gt;
            &lt;p&gt;hero = &lt;strong&gt;Nothing&lt;/strong&gt;    &lt;span class="comment"&gt;' Free the object&lt;/span&gt; &lt;/p&gt;
            &lt;p&gt;If hero &lt;strong&gt;Is&lt;/strong&gt; &lt;strong&gt;Nothing&lt;/strong&gt; Then _ &lt;br /&gt;
              hero = New SuperHero&lt;/p&gt;
            &lt;p&gt;Dim obj As Object = New SuperHero &lt;br /&gt;
            If &lt;strong&gt;TypeOf&lt;/strong&gt; obj &lt;strong&gt;Is&lt;/strong&gt; SuperHero Then _&lt;br /&gt;
              Console.WriteLine("Is a SuperHero object.") &lt;/p&gt;
            &lt;p&gt;&lt;span class="comment"&gt;' Mark object for quick disposal&lt;/span&gt;&lt;br /&gt;
            &lt;strong&gt;Using&lt;/strong&gt; reader As StreamReader = File.OpenText("test.txt")&lt;br /&gt;
              Dim line As String = reader.ReadLine()&lt;br /&gt;
              While Not line Is Nothing&lt;br /&gt;
                Console.WriteLine(line)&lt;br /&gt;
                line = reader.ReadLine()&lt;br /&gt;
              End While&lt;br /&gt;
            &lt;strong&gt;End Using&lt;/strong&gt; &lt;/p&gt;
            &lt;/td&gt;
            &lt;td height="163"&gt;
            &lt;p&gt;SuperHero hero = new SuperHero(); &lt;br /&gt;
            &lt;br /&gt;
            &lt;br /&gt;
            &lt;br /&gt;
            &lt;/p&gt;
            &lt;p&gt;&lt;span class="comment"&gt;// No "With" construct&lt;/span&gt;&lt;br /&gt;
            hero.Name = "SpamMan"; &lt;br /&gt;
            hero.PowerLevel = 3; &lt;br /&gt;
            &lt;br /&gt;
            &lt;br /&gt;
            &lt;/p&gt;
            &lt;p&gt;hero.Defend("Laura Jones");&lt;br /&gt;
            SuperHero.Rest();   &lt;span class="comment"&gt;// Calling static method&lt;/span&gt;&lt;/p&gt;
            &lt;p&gt;&lt;br /&gt;
            &lt;br /&gt;
            SuperHero hero2 = hero;   &lt;span class="comment"&gt;// Both reference the same object&lt;/span&gt; &lt;br /&gt;
            hero2.Name = "WormWoman"; &lt;br /&gt;
            Console.WriteLine(hero.Name);   &lt;span class="comment"&gt;// Prints WormWoman&lt;/span&gt; &lt;/p&gt;
            &lt;p&gt;hero = &lt;strong&gt;null&lt;/strong&gt; ;   &lt;span class="comment"&gt;// Free the object&lt;/span&gt; &lt;/p&gt;
            &lt;p&gt;if (hero == &lt;strong&gt;null&lt;/strong&gt;)&lt;br /&gt;
              hero = new SuperHero();&lt;/p&gt;
            &lt;p&gt;Object obj = new SuperHero(); &lt;br /&gt;
            if (obj &lt;strong&gt;is&lt;/strong&gt; SuperHero) &lt;br /&gt;
              Console.WriteLine("Is a SuperHero object."); &lt;/p&gt;
            &lt;span class="comment"&gt;// Mark object for quick disposal&lt;/span&gt;&lt;br /&gt;
            &lt;strong&gt;using&lt;/strong&gt; (StreamReader reader = File.OpenText("test.txt")) {&lt;br /&gt;
              string line;&lt;br /&gt;
              while ((line = reader.ReadLine()) != null)&lt;br /&gt;
                Console.WriteLine(line);&lt;br /&gt;
            } &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td colspan="2"&gt;
            &lt;div style="BORDER-RIGHT: white 2px solid; BORDER-TOP: white 2px solid; BORDER-LEFT: white 2px solid; BORDER-BOTTOM: white 2px solid"&gt;&lt;br /&gt;
            &lt;div style="BORDER-RIGHT: gray 4px solid; BORDER-TOP: gray 4px solid; FONT-WEIGHT: bold; FONT-SIZE: 15px; BORDER-LEFT: gray 4px solid; WIDTH: 100%; COLOR: gray; BORDER-BOTTOM: gray 4px solid; BACKGROUND-COLOR: silver; TEXT-ALIGN: center"&gt;&lt;br /&gt;
            &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/Default.aspx"&gt;Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c2_ASP.NET-Interview-Questions.aspx"&gt;ASP.NET Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c1_.NET-Interview-Questions.aspx"&gt;.NET Interview Questions &lt;/a&gt;&lt;br /&gt;
            &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c2_ASP.NET-Interview-Questions.aspx"&gt;ASP.NET 2.0 Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c1_.NET-Interview-Questions.aspx"&gt;.NET 2.0 Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/s23_SQL-Server-2005-Interview-Questions.aspx"&gt;SQL Server 2005 Interview Questions &lt;/a&gt;&lt;br /&gt;
            &lt;br /&gt;
            &lt;/div&gt;
            &lt;/div&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr align="center"&gt;
            &lt;td colspan="2"&gt;
            &lt;table id="Table17" width="100%" border="0" class="header"&gt;
                &lt;tbody&gt;
                    &lt;tr align="center"&gt;
                        &lt;td class="heading2" width="20%"&gt;VB.NET&lt;/td&gt;
                        &lt;td class="heading" width="60%"&gt;&lt;a name="structs"&gt;&lt;/a&gt;
                        &lt;h3&gt;Structs&lt;/h3&gt;
                        &lt;/td&gt;
                        &lt;td class="heading2" width="20%"&gt;C#&lt;/td&gt;
                    &lt;/tr&gt;
                &lt;/tbody&gt;
            &lt;/table&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr valign="top"&gt;
            &lt;td height="256"&gt;
            &lt;p&gt;&lt;strong&gt;Structure&lt;/strong&gt; StudentRecord &lt;br /&gt;
              Public name As String &lt;br /&gt;
              Public gpa As Single &lt;br /&gt;
            &lt;br /&gt;
              Public Sub New(ByVal name As String, ByVal gpa As Single) &lt;br /&gt;
                Me.name = name &lt;br /&gt;
                Me.gpa = gpa &lt;br /&gt;
              End Sub &lt;br /&gt;
            &lt;strong&gt;End Structure&lt;/strong&gt;&lt;/p&gt;
            &lt;p&gt;Dim stu As StudentRecord = New StudentRecord("Bob", 3.5) &lt;br /&gt;
            Dim stu2 As StudentRecord = stu   &lt;br /&gt;
            &lt;br /&gt;
            stu2.name = "Sue" &lt;br /&gt;
            Console.WriteLine(stu.name)    &lt;span class="comment"&gt;' Prints Bob&lt;/span&gt; &lt;br /&gt;
            Console.WriteLine(stu2.name)  &lt;span class="comment"&gt;' Prints Sue&lt;/span&gt;&lt;/p&gt;
            &lt;/td&gt;
            &lt;td height="256"&gt;&lt;strong&gt;struct&lt;/strong&gt; StudentRecord {&lt;br /&gt;
              public string name;&lt;br /&gt;
              public float gpa;&lt;br /&gt;
            &lt;br /&gt;
              public StudentRecord(string name, float gpa) {&lt;br /&gt;
                this.name = name;&lt;br /&gt;
                this.gpa = gpa;&lt;br /&gt;
              }&lt;br /&gt;
            }&lt;br /&gt;
            &lt;p&gt;StudentRecord stu = new StudentRecord("Bob", 3.5f);&lt;br /&gt;
            StudentRecord stu2 = stu;  &lt;br /&gt;
            &lt;br /&gt;
            stu2.name = "Sue";&lt;br /&gt;
            Console.WriteLine(stu.name);    &lt;span class="comment"&gt;// Prints Bob&lt;/span&gt;&lt;br /&gt;
            Console.WriteLine(stu2.name);   &lt;span class="comment"&gt;// Prints Sue&lt;/span&gt;&lt;/p&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td colspan="2"&gt;
            &lt;div style="BORDER-RIGHT: white 2px solid; BORDER-TOP: white 2px solid; BORDER-LEFT: white 2px solid; BORDER-BOTTOM: white 2px solid"&gt;&lt;br /&gt;
            &lt;div style="BORDER-RIGHT: gray 4px solid; BORDER-TOP: gray 4px solid; FONT-WEIGHT: bold; FONT-SIZE: 15px; BORDER-LEFT: gray 4px solid; WIDTH: 100%; COLOR: gray; BORDER-BOTTOM: gray 4px solid; BACKGROUND-COLOR: silver; TEXT-ALIGN: center"&gt;&lt;br /&gt;
            &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/Default.aspx"&gt;Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c2_ASP.NET-Interview-Questions.aspx"&gt;ASP.NET Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c1_.NET-Interview-Questions.aspx"&gt;.NET Interview Questions &lt;/a&gt;&lt;br /&gt;
            &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c2_ASP.NET-Interview-Questions.aspx"&gt;ASP.NET 2.0 Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c1_.NET-Interview-Questions.aspx"&gt;.NET 2.0 Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/s23_SQL-Server-2005-Interview-Questions.aspx"&gt;SQL Server 2005 Interview Questions &lt;/a&gt;&lt;br /&gt;
            &lt;br /&gt;
            &lt;/div&gt;
            &lt;/div&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr align="center"&gt;
            &lt;td colspan="2"&gt;
            &lt;table id="Table18" width="100%" border="0" class="header"&gt;
                &lt;tbody&gt;
                    &lt;tr align="center"&gt;
                        &lt;td class="heading2" width="20%"&gt;VB.NET&lt;/td&gt;
                        &lt;td class="heading" width="60%"&gt;&lt;a name="properties"&gt;&lt;/a&gt;
                        &lt;h3&gt;Properties&lt;/h3&gt;
                        &lt;/td&gt;
                        &lt;td class="heading2" width="20%"&gt;C#&lt;/td&gt;
                    &lt;/tr&gt;
                &lt;/tbody&gt;
            &lt;/table&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr valign="top"&gt;
            &lt;td width="50%" height="134"&gt;
            &lt;p&gt;Private _size As Integer&lt;br /&gt;
            &lt;br /&gt;
            Public &lt;strong&gt;Property&lt;/strong&gt; Size() As Integer&lt;br /&gt;
              &lt;strong&gt;Get&lt;/strong&gt; &lt;br /&gt;
                Return _size &lt;br /&gt;
              &lt;strong&gt;End Get&lt;/strong&gt; &lt;br /&gt;
              &lt;strong&gt;Set&lt;/strong&gt; (ByVal Value As Integer) &lt;br /&gt;
                If Value &amp;lt; 0 Then &lt;br /&gt;
                  _size = 0 &lt;br /&gt;
                Else &lt;br /&gt;
                  _size = Value &lt;br /&gt;
                End If &lt;br /&gt;
              &lt;strong&gt;End Set&lt;/strong&gt; &lt;br /&gt;
            &lt;strong&gt;End Property&lt;/strong&gt;&lt;/p&gt;
            &lt;p&gt;foo.Size += 1&lt;/p&gt;
            &lt;/td&gt;
            &lt;td width="50%" height="134"&gt;private int _size;&lt;br /&gt;
            &lt;br /&gt;
            public int Size { &lt;br /&gt;
              &lt;strong&gt;get&lt;/strong&gt; { &lt;br /&gt;
                return _size; &lt;br /&gt;
              } &lt;br /&gt;
              &lt;strong&gt;set&lt;/strong&gt; { &lt;br /&gt;
                if (value &amp;lt; 0) &lt;br /&gt;
                  _size = 0; &lt;br /&gt;
                else &lt;br /&gt;
                  _size = value; &lt;br /&gt;
              } &lt;br /&gt;
            }
            &lt;p&gt;&lt;br /&gt;
            foo.Size++; &lt;/p&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td colspan="2"&gt;
            &lt;div style="BORDER-RIGHT: white 2px solid; BORDER-TOP: white 2px solid; BORDER-LEFT: white 2px solid; BORDER-BOTTOM: white 2px solid"&gt;&lt;br /&gt;
            &lt;div style="BORDER-RIGHT: gray 4px solid; BORDER-TOP: gray 4px solid; FONT-WEIGHT: bold; FONT-SIZE: 15px; BORDER-LEFT: gray 4px solid; WIDTH: 100%; COLOR: gray; BORDER-BOTTOM: gray 4px solid; BACKGROUND-COLOR: silver; TEXT-ALIGN: center"&gt;&lt;br /&gt;
            &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/Default.aspx"&gt;Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c2_ASP.NET-Interview-Questions.aspx"&gt;ASP.NET Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c1_.NET-Interview-Questions.aspx"&gt;.NET Interview Questions &lt;/a&gt;&lt;br /&gt;
            &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c2_ASP.NET-Interview-Questions.aspx"&gt;ASP.NET 2.0 Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c1_.NET-Interview-Questions.aspx"&gt;.NET 2.0 Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/s23_SQL-Server-2005-Interview-Questions.aspx"&gt;SQL Server 2005 Interview Questions &lt;/a&gt;&lt;br /&gt;
            &lt;br /&gt;
            &lt;/div&gt;
            &lt;/div&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr align="center"&gt;
            &lt;td colspan="2"&gt;
            &lt;table id="Table19" width="100%" border="0" class="header"&gt;
                &lt;tbody&gt;
                    &lt;tr align="center"&gt;
                        &lt;td class="heading2" width="20%"&gt;VB.NET&lt;/td&gt;
                        &lt;td class="heading" width="60%"&gt;&lt;a name="delegatesandevents"&gt;&lt;/a&gt;
                        &lt;h3&gt;Delegates / Events&lt;/h3&gt;
                        &lt;/td&gt;
                        &lt;td class="heading2" width="20%"&gt;C#&lt;/td&gt;
                    &lt;/tr&gt;
                &lt;/tbody&gt;
            &lt;/table&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr valign="top"&gt;
            &lt;td width="50%" height="134"&gt;
            &lt;p&gt;&lt;strong&gt;Delegate&lt;/strong&gt; Sub MsgArrivedEventHandler(ByVal message As String)&lt;/p&gt;
            &lt;p&gt;&lt;strong&gt;Event&lt;/strong&gt; MsgArrivedEvent As MsgArrivedEventHandler&lt;/p&gt;
            &lt;p&gt;&lt;span class="comment"&gt;' or to define an event which declares a delegate implicitly&lt;/span&gt;&lt;br /&gt;
            &lt;strong&gt;Event&lt;/strong&gt; MsgArrivedEvent(ByVal message As String) &lt;/p&gt;
            &lt;p&gt;&lt;strong&gt;AddHandler&lt;/strong&gt; MsgArrivedEvent, &lt;strong&gt;AddressOf&lt;/strong&gt; My_MsgArrivedCallback &lt;br /&gt;
            &lt;span class="comment"&gt;' Won't throw an exception if obj is Nothing&lt;br /&gt;
            &lt;/span&gt;&lt;strong&gt;RaiseEvent&lt;/strong&gt; MsgArrivedEvent("Test message") &lt;br /&gt;
            &lt;strong&gt;RemoveHandler&lt;/strong&gt; MsgArrivedEvent, &lt;strong&gt;AddressOf&lt;/strong&gt; My_MsgArrivedCallback&lt;br /&gt;
            &lt;/p&gt;
            &lt;p&gt;Imports System.Windows.Forms&lt;/p&gt;
            &lt;p&gt;Dim &lt;strong&gt;WithEvents&lt;/strong&gt; MyButton As Button   &lt;span class="comment"&gt;' WithEvents can't be used on local variable&lt;/span&gt;&lt;br /&gt;
            MyButton = New Button&lt;/p&gt;
            &lt;p&gt;Private Sub MyButton_Click(ByVal sender As System.Object, _&lt;br /&gt;
              ByVal e As System.EventArgs) &lt;strong&gt;Handles&lt;/strong&gt; MyButton.Click &lt;br /&gt;
              MessageBox.Show(Me, "Button was clicked", "Info", _&lt;br /&gt;
                MessageBoxButtons.OK, MessageBoxIcon.Information) &lt;br /&gt;
            End Sub&lt;/p&gt;
            &lt;/td&gt;
            &lt;td width="50%" height="134"&gt;
            &lt;p&gt;&lt;strong&gt;delegate&lt;/strong&gt; void MsgArrivedEventHandler(string message); &lt;/p&gt;
            &lt;p&gt;&lt;strong&gt;event&lt;/strong&gt; MsgArrivedEventHandler MsgArrivedEvent;&lt;/p&gt;
            &lt;p&gt;&lt;span class="comment"&gt;// Delegates must be used with events in C#&lt;/span&gt;&lt;br /&gt;
            &lt;br /&gt;
            &lt;br /&gt;
            MsgArrivedEvent &lt;strong&gt;+=&lt;/strong&gt; new MsgArrivedEventHandler(My_MsgArrivedEventCallback);&lt;br /&gt;
            MsgArrivedEvent("Test message");    &lt;span class="comment"&gt;// Throws exception if obj is null&lt;/span&gt;&lt;br /&gt;
            MsgArrivedEvent &lt;strong&gt;-=&lt;/strong&gt; new MsgArrivedEventHandler(My_MsgArrivedEventCallback);&lt;/p&gt;
            &lt;p&gt;&lt;br /&gt;
            &lt;br /&gt;
            using System.Windows.Forms;&lt;/p&gt;
            &lt;p&gt;Button MyButton = new Button(); &lt;br /&gt;
            MyButton.Click += new System.EventHandler(MyButton_Click);&lt;/p&gt;
            &lt;p&gt;private void MyButton_Click(object sender, System.EventArgs e) { &lt;br /&gt;
              MessageBox.Show(this, "Button was clicked", "Info", &lt;br /&gt;
                MessageBoxButtons.OK, MessageBoxIcon.Information); &lt;br /&gt;
            }&lt;/p&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td colspan="2"&gt;
            &lt;div style="BORDER-RIGHT: white 2px solid; BORDER-TOP: white 2px solid; BORDER-LEFT: white 2px solid; BORDER-BOTTOM: white 2px solid"&gt;&lt;br /&gt;
            &lt;div style="BORDER-RIGHT: gray 4px solid; BORDER-TOP: gray 4px solid; FONT-WEIGHT: bold; FONT-SIZE: 15px; BORDER-LEFT: gray 4px solid; WIDTH: 100%; COLOR: gray; BORDER-BOTTOM: gray 4px solid; BACKGROUND-COLOR: silver; TEXT-ALIGN: center"&gt;&lt;br /&gt;
            &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/Default.aspx"&gt;Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c2_ASP.NET-Interview-Questions.aspx"&gt;ASP.NET Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c1_.NET-Interview-Questions.aspx"&gt;.NET Interview Questions &lt;/a&gt;&lt;br /&gt;
            &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c2_ASP.NET-Interview-Questions.aspx"&gt;ASP.NET 2.0 Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c1_.NET-Interview-Questions.aspx"&gt;.NET 2.0 Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/s23_SQL-Server-2005-Interview-Questions.aspx"&gt;SQL Server 2005 Interview Questions &lt;/a&gt;&lt;br /&gt;
            &lt;br /&gt;
            &lt;/div&gt;
            &lt;/div&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr align="center"&gt;
            &lt;td colspan="2"&gt;
            &lt;table id="Table20" width="100%" border="0" class="header"&gt;
                &lt;tbody&gt;
                    &lt;tr align="center"&gt;
                        &lt;td class="heading2" width="20%"&gt;VB.NET&lt;/td&gt;
                        &lt;td class="heading" width="60%"&gt;&lt;a name="#consoleio"&gt;&lt;/a&gt;
                        &lt;h3&gt;Console I/O&lt;/h3&gt;
                        &lt;/td&gt;
                        &lt;td class="heading2" width="20%"&gt;C#&lt;/td&gt;
                    &lt;/tr&gt;
                &lt;/tbody&gt;
            &lt;/table&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr valign="top"&gt;
            &lt;td width="50%" height="163"&gt;
            &lt;p&gt;Console.Write("What's your name? ") &lt;br /&gt;
            Dim name As String = Console.ReadLine() &lt;br /&gt;
            Console.Write("How old are you? ") &lt;br /&gt;
            Dim age As Integer = Val(Console.ReadLine()) &lt;br /&gt;
            Console.WriteLine("{0} is {1} years old.", name, age)  &lt;br /&gt;
            &lt;span class="comment"&gt;' or&lt;/span&gt; &lt;br /&gt;
            Console.WriteLine(name &amp;amp; " is " &amp;amp; age &amp;amp; " years old.") &lt;br /&gt;
            &lt;br /&gt;
            Dim c As Integer &lt;br /&gt;
            c = Console.Read()    &lt;span class="comment"&gt;' Read single char&lt;/span&gt; &lt;br /&gt;
            Console.WriteLine(c)   &lt;span class="comment"&gt;' Prints 65 if user enters "A"&lt;/span&gt; &lt;/p&gt;
            &lt;/td&gt;
            &lt;td width="50%" height="163"&gt;
            &lt;p&gt;Console.Write("What's your name? ");&lt;br /&gt;
            string name = Console.ReadLine();&lt;br /&gt;
            Console.Write("How old are you? ");&lt;br /&gt;
            int age = Convert.ToInt32(Console.ReadLine());&lt;br /&gt;
            Console.WriteLine("{0} is {1} years old.", name, age);&lt;br /&gt;
            &lt;span class="comment"&gt;// or&lt;/span&gt;&lt;br /&gt;
            Console.WriteLine(name + " is " + age + " years old."); &lt;/p&gt;
            &lt;p&gt;&lt;br /&gt;
            int c = Console.Read();  &lt;span class="comment"&gt;// Read single char&lt;/span&gt;&lt;br /&gt;
            Console.WriteLine(c);    &lt;span class="comment"&gt;// Prints 65 if user enters "A"&lt;/span&gt;&lt;/p&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td colspan="2"&gt;
            &lt;div style="BORDER-RIGHT: white 2px solid; BORDER-TOP: white 2px solid; BORDER-LEFT: white 2px solid; BORDER-BOTTOM: white 2px solid"&gt;&lt;br /&gt;
            &lt;div style="BORDER-RIGHT: gray 4px solid; BORDER-TOP: gray 4px solid; FONT-WEIGHT: bold; FONT-SIZE: 15px; BORDER-LEFT: gray 4px solid; WIDTH: 100%; COLOR: gray; BORDER-BOTTOM: gray 4px solid; BACKGROUND-COLOR: silver; TEXT-ALIGN: center"&gt;&lt;br /&gt;
            &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/Default.aspx"&gt;Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c2_ASP.NET-Interview-Questions.aspx"&gt;ASP.NET Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c1_.NET-Interview-Questions.aspx"&gt;.NET Interview Questions &lt;/a&gt;&lt;br /&gt;
            &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c2_ASP.NET-Interview-Questions.aspx"&gt;ASP.NET 2.0 Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c1_.NET-Interview-Questions.aspx"&gt;.NET 2.0 Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/s23_SQL-Server-2005-Interview-Questions.aspx"&gt;SQL Server 2005 Interview Questions &lt;/a&gt;&lt;br /&gt;
            &lt;br /&gt;
            &lt;/div&gt;
            &lt;/div&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr align="center"&gt;
            &lt;td colspan="2"&gt;
            &lt;table id="Table21" width="100%" border="0" class="header"&gt;
                &lt;tbody&gt;
                    &lt;tr align="center"&gt;
                        &lt;td class="heading2" width="20%"&gt;VB.NET&lt;/td&gt;
                        &lt;td class="heading" width="60%"&gt;&lt;a name="fileio"&gt;&lt;/a&gt;
                        &lt;h3&gt;File I/O&lt;/h3&gt;
                        &lt;/td&gt;
                        &lt;td class="heading2" width="20%"&gt;C#&lt;/td&gt;
                    &lt;/tr&gt;
                &lt;/tbody&gt;
            &lt;/table&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr valign="top"&gt;
            &lt;td width="50%" height="163"&gt;
            &lt;p&gt;Imports System.IO&lt;/p&gt;
            &lt;p&gt;&lt;span class="comment"&gt;' Write out to text file&lt;/span&gt;&lt;br /&gt;
            Dim writer As &lt;strong&gt;StreamWriter&lt;/strong&gt; = File.CreateText("c:\myfile.txt") &lt;br /&gt;
            writer.WriteLine("Out to file.") &lt;br /&gt;
            writer.Close() &lt;/p&gt;
            &lt;p&gt;&lt;span class="comment"&gt;' Read all lines from text file&lt;/span&gt;&lt;br /&gt;
            Dim reader As &lt;strong&gt;StreamReader&lt;/strong&gt; = File.OpenText("c:\myfile.txt") &lt;br /&gt;
            Dim line As String = reader.ReadLine() &lt;br /&gt;
            While Not line Is Nothing &lt;br /&gt;
              Console.WriteLine(line) &lt;br /&gt;
              line = reader.ReadLine() &lt;br /&gt;
            End While &lt;br /&gt;
            reader.Close() &lt;/p&gt;
            &lt;p&gt;&lt;span class="comment"&gt;' Write out to binary file&lt;/span&gt;&lt;br /&gt;
            Dim str As String = "Text data" &lt;br /&gt;
            Dim num As Integer = 123 &lt;br /&gt;
            Dim binWriter As New &lt;strong&gt;BinaryWriter&lt;/strong&gt;(File.OpenWrite("c:\myfile.dat"))  &lt;br /&gt;
            binWriter.Write(str)  &lt;br /&gt;
            binWriter.Write(num) &lt;br /&gt;
            binWriter.Close()&lt;/p&gt;
            &lt;p&gt;&lt;span class="comment"&gt;' Read from binary file&lt;/span&gt;&lt;br /&gt;
            Dim binReader As New &lt;strong&gt;BinaryReader&lt;/strong&gt;(File.OpenRead("c:\myfile.dat")) &lt;br /&gt;
            str = binReader.ReadString() &lt;br /&gt;
            num = binReader.ReadInt32() &lt;br /&gt;
            binReader.Close()&lt;/p&gt;
            &lt;/td&gt;
            &lt;td width="50%" height="163"&gt;
            &lt;p&gt;using System.IO;&lt;/p&gt;
            &lt;p&gt;&lt;span class="comment"&gt;// Write out to text file&lt;/span&gt;&lt;br /&gt;
            &lt;strong&gt;StreamWriter&lt;/strong&gt; writer = File.CreateText("c:\\myfile.txt"); &lt;br /&gt;
            writer.WriteLine("Out to file."); &lt;br /&gt;
            writer.Close(); &lt;/p&gt;
            &lt;p&gt;&lt;span class="comment"&gt;// Read all lines from text file&lt;/span&gt;&lt;br /&gt;
            &lt;strong&gt;StreamReader&lt;/strong&gt; reader = File.OpenText("c:\\myfile.txt"); &lt;br /&gt;
            string line = reader.ReadLine(); &lt;br /&gt;
            while (line != null) {&lt;br /&gt;
              Console.WriteLine(line); &lt;br /&gt;
              line = reader.ReadLine(); &lt;br /&gt;
            } &lt;br /&gt;
            reader.Close(); &lt;/p&gt;
            &lt;p&gt;&lt;span class="comment"&gt;// Write out to binary file&lt;/span&gt;&lt;br /&gt;
            string str = "Text data"; &lt;br /&gt;
            int num = 123; &lt;br /&gt;
            &lt;strong&gt;BinaryWriter&lt;/strong&gt; binWriter = new BinaryWriter(File.OpenWrite("c:\\myfile.dat")); &lt;br /&gt;
            binWriter.Write(str); &lt;br /&gt;
            binWriter.Write(num); &lt;br /&gt;
            binWriter.Close(); &lt;/p&gt;
            &lt;p&gt;&lt;span class="comment"&gt;// Read from binary file&lt;/span&gt;&lt;br /&gt;
            &lt;strong&gt;BinaryReader&lt;/strong&gt; binReader = new BinaryReader(File.OpenRead("c:\\myfile.dat")); &lt;br /&gt;
            str = binReader.ReadString(); &lt;br /&gt;
            num = binReader.ReadInt32(); &lt;br /&gt;
            binReader.Close();&lt;/p&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td colspan="2"&gt;
            &lt;div style="BORDER-RIGHT: white 2px solid; BORDER-TOP: white 2px solid; BORDER-LEFT: white 2px solid; BORDER-BOTTOM: white 2px solid"&gt;&lt;br /&gt;
            &lt;div style="BORDER-RIGHT: gray 4px solid; BORDER-TOP: gray 4px solid; FONT-WEIGHT: bold; FONT-SIZE: 15px; BORDER-LEFT: gray 4px solid; WIDTH: 100%; COLOR: gray; BORDER-BOTTOM: gray 4px solid; BACKGROUND-COLOR: silver; TEXT-ALIGN: center"&gt;&lt;br /&gt;
            &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/Default.aspx"&gt;Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c2_ASP.NET-Interview-Questions.aspx"&gt;ASP.NET Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c1_.NET-Interview-Questions.aspx"&gt;.NET Interview Questions &lt;/a&gt;&lt;br /&gt;
            &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c2_ASP.NET-Interview-Questions.aspx"&gt;ASP.NET 2.0 Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/c1_.NET-Interview-Questions.aspx"&gt;.NET 2.0 Interview Questions &lt;/a&gt;| &lt;a style="FONT-WEIGHT: bold; FONT-SIZE: 15px; COLOR: blue" target="_blank" href="http://www.thinkinterview.com/Interview-Questions/s23_SQL-Server-2005-Interview-Questions.aspx"&gt;SQL Server 2005 Interview Questions &lt;/a&gt;&lt;br /&gt;
            &lt;br /&gt;
            &lt;/div&gt;
            &lt;/div&gt;
            &lt;p&gt; &lt;/p&gt;
            &lt;p&gt; &lt;/p&gt;
            &lt;p&gt;Source:    &lt;font face="Arial"&gt;&lt;a href="http://www.harding.edu/fmccown/vbnet_csharp_comparison.html"&gt;&lt;strong&gt;http://www.harding.edu/fmccown/vbnet_csharp_comparison.html&lt;/strong&gt;&lt;/a&gt;&lt;/font&gt;&lt;/p&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=118230"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=118230" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/mahesh/aggbug/118230.aspx" width="1"