{"id":1700,"date":"2017-04-15T13:00:00","date_gmt":"2017-04-15T11:00:00","guid":{"rendered":"https:\/\/demo.sidekick.be\/itenium\/vbnet-vs-csharp\/"},"modified":"2025-11-28T13:31:47","modified_gmt":"2025-11-28T12:31:47","slug":"vbnet-vs-csharp","status":"publish","type":"post","link":"https:\/\/demo.sidekick.be\/itenium\/blog\/dotnet\/vbnet-vs-csharp\/","title":{"rendered":"VB.NET vs C# Syntax differences"},"content":{"rendered":"<h2 id=\"confusingly-different\">Confusingly different<\/h2>\n<p>Or some fun issues during heavy context switching \ud83d\ude42<\/p>\n<ul>\n<li>Terminating statements with <code>;<\/code> in VB.NET or not using <code>_<\/code> for line continuations.<\/li>\n<li>Compare with <code>=<\/code> in C# or with <code>==<\/code> in VB.NET (and <code>!=<\/code> vs <code>&lt;&gt;<\/code>)<\/li>\n<li>VB.NET is <em>not<\/em> case sensitive<\/li>\n<li>Arrays in VB.NET are 1 based<\/li>\n<\/ul>\n<h2 id=\"syntax-comparison\">Syntax comparison<\/h2>\n<h3 id=\"general-syntax\">General syntax<\/h3>\n<pre><code class=\"language-vb\">' VB.NET\n#If DEBUG Then\n#End If\n#Region \"Imports\"\nImports System\n#End Region\nNamespace MyApp\n\t&lt;Serializable&gt;\n\tPublic Class HappyCoding\n\t\t''' &lt;summary&gt;\n\t\t''' XML Comment\n\t\t''' &lt;\/summary&gt;\n\t\tShared Sub Main(ByVal args() As String)\n\t\t\tDim name As String = \"VB.NET\"\n\t\t\tDim builder As New StringBuilder()\n\n\t\t\t' \"X\"c for defining a char\n\t\t\tbuilder.Append(\"A\"c)\n\n\t\t\t' Parentheses are optional when calling\n\t\t\t' a method without parameters\n\t\t\t' Array accessor is with parentheses (), not with []\n\t\t\t' All this allows for \"fun\" like this:\n\t\t\tDim firstChar = builder.ToString.ToArray(0)\n\t\tEnd Sub\n\tEnd Class\nEnd Namespace\n<\/code><\/pre>\n<p>C# equivalent<\/p>\n<pre><code class=\"language-c#\">#if DEBUG\n#endif\n#region usings\nusing System;\n#endregion\nnamespace MyApp {\n\t[Serializable]\n\tpublic class HappyCoding {\n\t\t\/\/\/ &lt;summary&gt;\n\t\t\/\/\/ XML Comment\n\t\t\/\/\/ &lt;\/summary&gt;\n\t\tstatic void Main(string[] args) {\n\t\t\tstring name = \"C#\";\n\t\t\tvar builder = new StringBuilder();\n\t\t\tbuilder.Append('A');\n\t\t\tchar firstChar = builder.ToString().ToArray()[0];\n\t\t}\n\t}\n}\n<\/code><\/pre>\n<h3 id=\"data-types\">Data Types<\/h3>\n<table class=\"table-code\">\n<thead>\n<tr>\n<th>VB.NET<\/th>\n<th>C#<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Dim b As Byte = &amp;H2A<\/td>\n<td>byte b = 0x2A;<\/td>\n<\/tr>\n<tr>\n<td>Dim c As Char = \u201cB\u201dc<\/td>\n<td>char c = \u2018c\u2019;<\/td>\n<\/tr>\n<tr>\n<td>Dim d As Decimal = 35.99@<\/td>\n<td>decimal d = 35.99m;<\/td>\n<\/tr>\n<tr>\n<td>Dim f As Single = 2.9!<\/td>\n<td>float f = 2.9f;<\/td>\n<\/tr>\n<tr>\n<td>Dim pi As Double = 3.1415<\/td>\n<td>double pi = 3.1415D;<\/td>\n<\/tr>\n<tr>\n<td>Dim lng As Long = 123456L \u2018 UL<\/td>\n<td>long lng = 123456L; \/\/ UL<\/td>\n<\/tr>\n<tr>\n<td>Dim s As Short = 123S \u2018 US<\/td>\n<td>short s = 123;<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>Dim i? As Integer = Nothing<\/td>\n<td>int? i = null;<\/td>\n<\/tr>\n<tr>\n<td>Dim i As Integer?<\/td>\n<td>int? i;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<pre><code class=\"language-vb\">Dim d As Date = #10\/15\/2005# ' C#: var d = new DateTime(2005, 10, 15)\nDim dt As DateTime = #10\/15\/2005 12:15:00 PM#\n<\/code><\/pre>\n<p>This compiles!? How cool is VB.NET \ud83d\ude42<br \/> A VB.NET <code>Date<\/code> is in fact an alias for <code>DateTime<\/code>. So yes, <code>Date<\/code> does have a time part.<\/p>\n<h3 id=\"type-information\">Type Information<\/h3>\n<table class=\"table-code\">\n<thead>\n<tr>\n<th>VB.NET<\/th>\n<th>C#<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Dim x As Integer<\/td>\n<td>int x;<\/td>\n<\/tr>\n<tr>\n<td>x.GetType()<\/td>\n<td>x.GetType();<\/td>\n<\/tr>\n<tr>\n<td>GetType(Integer)<\/td>\n<td>typeof(int);<\/td>\n<\/tr>\n<tr>\n<td>TypeName(x)<\/td>\n<td>x.GetType().Name;<\/td>\n<\/tr>\n<tr>\n<td>NameOf(StringBuilder)<\/td>\n<td>nameof(StringBuilder)<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>Dim lng = CType(x, Long)<\/td>\n<td>var lng = Convert.ToInt64(x);<\/td>\n<\/tr>\n<tr>\n<td>Dim lng = CLng(x)<\/td>\n<td>var lng = Convert.ToInt64(x);<\/td>\n<\/tr>\n<tr>\n<td>Dim i = Int(x)<\/td>\n<td>var i = Conversion.Int(x);<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>Dim s As New Shape<\/td>\n<td>var s = new Shape();<\/td>\n<\/tr>\n<tr>\n<td>TypeOf s IsNot Circle<\/td>\n<td>!(s is Circle)<\/td>\n<\/tr>\n<tr>\n<td>s1 Is s2<\/td>\n<td>Object.ReferenceEquals(s1, s2)<\/td>\n<\/tr>\n<tr>\n<td>Dim c = TryCast(s, Circle)<\/td>\n<td>var c = s as Circle;<\/td>\n<\/tr>\n<tr>\n<td>c = DirectCast(s, Circle)<\/td>\n<td>c = (Circle)s;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Aside from CLng, VB.NET also has: CInt, CDate, CStr, CByte, CDbl, CBool, CObj, Chr. And more conversion methods in <code>Microsoft.VisualBasic.Conversion<\/code>. This is a Module so <code>Conversion.Int(x)<\/code> is available as <code>Int(x)<\/code> without Import.<\/p>\n<h3 id=\"operators-strings\">Operators, Strings<\/h3>\n<table class=\"table-base\">\n<thead>\n<tr>\n<th>VB.NET<\/th>\n<th>C#<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Comparison<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>&lt;&gt; = &lt; &gt; &lt;= &gt;=<\/td>\n<td>!= == &lt; &gt; &lt;= &gt;=<\/td>\n<\/tr>\n<tr>\n<td>And Or Xor Not \u00ab\u00a0 \u00a0\u00bb<\/td>\n<td>&amp; | ^ ~ \u00ab\u00a0 \u00a0\u00bb<\/td>\n<\/tr>\n<tr>\n<td>AndAlso OrElse Not<\/td>\n<td>&amp;&amp; || !<\/td>\n<\/tr>\n<tr>\n<td>x Is Nothing Or y IsNot Nothing<\/td>\n<td>x == null | y != null<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>Arithmetic<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>+ &#8211; * \/<\/td>\n<td>Same<\/td>\n<\/tr>\n<tr>\n<td>Mod<\/td>\n<td>%<\/td>\n<\/tr>\n<tr>\n<td> (integer division)<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>^ (raise to a power)<\/td>\n<td>Math.Pow<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>Assignment<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>= += -=, \u2026<\/td>\n<td>= += -=, \u2026<\/td>\n<\/tr>\n<\/tbody>\n<tbody>\n<tr>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>Strings<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>Concatenation: &amp;<\/td>\n<td>+<\/td>\n<\/tr>\n<tr>\n<td>Escape quote: \u201c\u201d<\/td>\n<td>\u201d<\/td>\n<\/tr>\n<tr>\n<td>vbCrLf, vbTab, \u2026<\/td>\n<td>rn, t, \u2026<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>All logical comparisons in VB.NET are typically done with <code>AndAlso<\/code> and <code>OrElse<\/code>. It\u2019s (surprise surprise) more typing than <code>And\/Or<\/code> but the latter don\u2019t short-circuit the evaluations. Ex: <code>If x IsNot Nothing And x.Trigger() Then<\/code> will crash.<\/p>\n<p>To escape a reserved word <code>Public Class [Class]<\/code>. (C#: <code>public class @class<\/code>)<\/p>\n<h3 id=\"control-flow\">Control flow<\/h3>\n<table class=\"table-code\">\n<thead>\n<tr>\n<th>VB.NET<\/th>\n<th>C#<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Dim i = If(y, 5)<\/td>\n<td>var i = y ?? 5;<\/td>\n<\/tr>\n<tr>\n<td>Dim x = If(i &gt; 0, \u201ct\u201d, \u201cf\u201d)<\/td>\n<td>var x = i &gt; 0 ? \u201ct\u201d : \u201cf\u201d<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<pre><code class=\"language-vb\">If x &lt; 0 Then res = \"oeps\" Else res = \"yaye\"\n\nIf x &gt; 5 Then\n\tx *= y\nElseIf x = 5 OrElse y Mod 2 = 0\n\t' Then is optional\n\tx += y\nElse\n\tx \/= y\nEnd If\n\n' Microsoft.VisualBasic.CompilerServices.LikeOperator.LikeString\n' Uses: Option Compare Binary\/Text\nIf \"John 3:16\" Like \"Jo[Hh]? #:*\" Then\n\t' Use [!A-Z] for Regex [^A-Z]\n\t' VB.NET Like =&gt; Regex\n\t' # =&gt; d, * =&gt; .*, ? =&gt; .\nEnd If\n' C#: Use Regex\n\n' VB.NET switch is more feature rich\n' There is no break; and no fallback\nSelect Case x\n\tCase 1, 2, 5 To 10\n\tCase Is = y ' Is is optional\n\tCase Is &gt; 10\n\tCase Else\n\t\t' Exit Select is implied\nEnd Select\n\nSelect Case x.GetType\n\tCase GetType(StringBuilder)\nEnd Select\n\nFor i As Integer = 0 To arr.Length - 1 Step 3\n\t' Step 1 is the default\nNext\n\/\/ C#: for (i = 0; i &lt; arr.Length; i += 3) {}\n\nFor Each n As String In names\n\tExit For\n\tContinue For\nNext\n\n\/\/ C#\nforeach (string n in names) {\n\tbreak;\n\tcontinue;\n}\n<\/code><\/pre>\n<h3 id=\"classes-generics-methods-enums-\">Classes, Generics, Methods, Enums, \u2026<\/h3>\n<table class=\"table-code\">\n<thead>\n<tr>\n<th>VB.NET<\/th>\n<th>C#<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Public<\/td>\n<td>public<\/td>\n<\/tr>\n<tr>\n<td>Private<\/td>\n<td>private<\/td>\n<\/tr>\n<tr>\n<td>Friend<\/td>\n<td>internal<\/td>\n<\/tr>\n<tr>\n<td>Protected<\/td>\n<td>protected<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>Partial Class<\/td>\n<td>partial class<\/td>\n<\/tr>\n<tr>\n<td>MustInherit Class<\/td>\n<td>abstract class<\/td>\n<\/tr>\n<tr>\n<td>NotInheritable Class<\/td>\n<td>sealed class<\/td>\n<\/tr>\n<tr>\n<td>Module<\/td>\n<td>static class<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>Methods<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>MustOverride<\/td>\n<td>abstract<\/td>\n<\/tr>\n<tr>\n<td>NotInheritable<\/td>\n<td>sealed<\/td>\n<\/tr>\n<tr>\n<td>Shared<\/td>\n<td>static<\/td>\n<\/tr>\n<tr>\n<td>Overridable<\/td>\n<td>virtual<\/td>\n<\/tr>\n<tr>\n<td>Overloads \u2018 is optional<\/td>\n<td>\/\/ no keyword required<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<pre><code class=\"language-vb\">Interface IAlarm\n\tProperty WakeUpAt As DateTime\nEnd Interface\n\nStructure Student\nEnd Structure\n\nEnum Action\n\tStart = 1\n\t[Stop] ' Escape reserved words with []\nEnd Enum\n' enum Action {Start = 1, Stop}\n\nClass MyColl(Of TEntity)\n\tInherits ObjectModel.Collection(Of TEntity)\n\tImplements IDisposable, IAlarm\n\t' Class MyCall&lt;TEntity&gt; : Collection&lt;TEntity&gt;, IDisposable, IAlarm\n\n\tReadOnly MinInt As Integer = 0\n\tConst MaxInt As Integer = 25\n\n\tPublic Property WakeUpAt As Date Implements IAlarm.WakeUpAt\n\t' public DateTime WakeUpAt { get; set; }\n\n\tPublic Sub New()\n\t\t' : this(DateTime.Now)\n\t\tMe.New(DateTime.Now)\n\tEnd Sub\n\n\tPublic Sub New(ByVal time As Date)\n\t\t' : base()\n\t\tMyBase.New()\n\tEnd Sub\n\n\tShared Sub New()\n\t\t' static constructor\n\tEnd Sub\n\n\tProtected Overrides Sub Finalize()\n\t\t' C# \"destructor\": ~MyColl() {}\n\t\tMyBase.Finalize()\n\tEnd Sub\n\n\t' Default value, Get and Set both Public\n\tPublic Property Size As Integer = -1\n\n\tPrivate _name As String\n\tPublic Property Name As String\n\t\tGet\n\t\t\tReturn _name\n\t\tEnd Get\n\t\tProtected Set(ByVal value As String)\n\t\t\t_name = value\n\t\tEnd Set\n\tEnd Property\n\n\t' WriteOnly for setter only\n\tPublic ReadOnly Property Name As String\n\t\tGet\n\t\t\tReturn _name\n\t\tEnd Get\n\tEnd Property\n\n\tShared Function Max(Of T As {IComparable, Structure})(ByVal ParamArray items As T()) As T\n\t\t' static T Max&lt;T&gt;(params T[] items) where T : IComparable, struct\n\t\t' It is possible to assign the return value to the method name instead of Return items.Max\n\t\tMax = items.Max\n\tEnd Function\n\n\tProtected Friend Function Yaye(Optional b As Boolean = True) As Boolean\n\t\tStatic entered As Integer\n\t\t' Will increase with 1 each time the method is called\n\t\tentered += 1\n\t\tReturn True\n\tEnd Function\n\n\tPrivate Function Yaye(Of Q As New)(ByRef b As String) As Q\n\t\t' private Q Yaye&lt;Q&gt;(ref string b) where Q : new()\n\t\t' VB.NET has no Out, only ByRef\n\t\tReturn new Q()\n\tEnd Function\n\n\tPrivate Function YayeCaller() As Integer\n\t\t' Can pass a Property As ByRef\n\t\tReturn Me.Yaye(Of Integer)(Name)\n\tEnd Function\nEnd Class\n<\/code><\/pre>\n<h3 id=\"linq-lambdas-and-anonymous-types\">Linq, Lambdas and Anonymous Types<\/h3>\n<p><strong>Lambdas<\/strong>:<\/p>\n<pre><code class=\"language-vb\">Dim adder = Function(x) x + 1\n' x =&gt; x + 1\n\nDim writer =\n\tSub(time As TimeSpan)\n\t\tConsole.WriteLine(time)\n\tEnd Sub\n<\/code><\/pre>\n<p><strong>Events<\/strong>:<\/p>\n<pre><code class=\"language-vb\">Public Class School\n\tEvent Recess(ByVal time As TimeSpan)\n\n\tSub Sit()\n\t\t' No null check required\n\t\tRaiseEvent Recess(TimeSpan.FromMinutes(15))\n\tEnd Sub\nEnd Class\n\nShared Sub Main()\n\tDim school As New School\n\tAddHandler school.Recess, writer\n\t' AddHandler school.Recess, AddressOf Me.Play\n\tschool.Sit()\n\tRemoveHandler school.Recess, writer\nEnd Sub\n<\/code><\/pre>\n<p><strong>Anonymous Types<\/strong>:<\/p>\n<pre><code class=\"language-vb\">Dim stu = New With {Key .Name = \"Sue\", .Gpa = 3.4}\n' var stu2 = new {Name = \"Sue\", Gpa = 3.5};\n<\/code><\/pre>\n<p>C# doesn\u2019t have <code>Key<\/code> which is used for comparisons: <code>stu.Equals(stu2)<\/code>.<br \/> VB.NET without the <code>Key<\/code> keyword and C# consider two anonymous types to be equal if all their properties are equal.<\/p>\n<p><strong>Linq<\/strong>:<\/p>\n<pre><code class=\"language-vb\">Public Class Person\n\tProperty Name As String\n\tProperty Age As Integer\nEnd Class\n\nDim persons As New List(Of Person) From \n{\n\tNew Person With {.Name = \"Bob\", .Age = 21},\n\tNew Person With {.Name = \"Alice\", .Age = 25},\n\tNew Person With {.Name = \"Janice\", .Age = 25}\n}\n\nDim adults =\n\tFrom p In persons\n\tWhere p.Age &gt; 18\n\tOrder By p.Name Descending\n\tSelect New With {Key p.Name, .YearsOnEarth = p.Age}\n\tTake 5\n\n' Do need _ for line continuations here\nDim lambdaAdults = persons _\n\t.Where(Function(p) p.Age &gt; 18) _\n\t.OrderByDescending(Function(p) p.Name) _\n\t.Select(Function(p) New With {Key p.Name, .YearsOnEarth = p.Age}) _\n\t.Take(5)\n<\/code><\/pre>\n<p>Basic C# query syntax is exactly the same with all keywords in lowercase. Except <code>Order By<\/code> which is <code>orderby x desc<\/code> in C#. VB.NET also adds some extra functionality like <code>Take While<\/code>, <code>Select p Distinct<\/code>, <code>Skip<\/code> and <code>Skip While<\/code>.<\/p>\n<pre><code class=\"language-vb\">' Without projection, Select is optional\nDim peopleByAge =\n\tFrom p In persons\n\tGroup By Age = p.Age\n\tInto People = Group, Count()\n\n' TODO: VB.NET LINQ to add Group By, Join, Group Join, Aggregate and Let clauses\n' I should probably add some additional stuff here with exact C# translations\n' https:\/\/msdn.microsoft.com\/en-us\/library\/bb763068.aspx\n<\/code><\/pre>\n<h3 id=\"initializers\">Initializers<\/h3>\n<table class=\"table-code\">\n<thead>\n<tr>\n<th>VB.NET<\/th>\n<th>C#<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Dim nums = New Integer() {1, 2, 3}<\/td>\n<td>int[] nums = new[] {1, 2, 3};<\/td>\n<\/tr>\n<tr>\n<td>Dim nums() As Integer = {1, 2, 3}<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>Dim names(4) As String \u2018 4 elements<\/td>\n<td>var names = new string[5];<\/td>\n<\/tr>\n<tr>\n<td>ReDim Preserve names(6) \u2018 Preserve optional<\/td>\n<td>Array.Resize(ref names, 7);<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>Dim h = New Hero With {.Name = \u201cDeadpool\u201d}<\/td>\n<td>var h = new Hero() {Name = \u201cDeadpool\u201d};<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<pre><code class=\"language-vb\">' VB.NET\nDim nums = New List(Of Integer) From {1, 2, 3}\nDim students As New Dictionary(Of Integer, String) From\n{\n\t{123, \"Bob\"}, {456, \"Alice\"}\n}\n<\/code><\/pre>\n<pre><code class=\"language-c#\">\/\/ C#\nvar nums = new List&lt;int&gt;() {1, 2, 3};\nvar students = new Dictionary&lt;int, string&gt;\n{\n\t{123, \"Bob\"}, {456, \"Alice\"}\n};\n<\/code><\/pre>\n<h3 id=\"other\">Other<\/h3>\n<p><strong>Exception Handling<\/strong>:<\/p>\n<pre><code class=\"language-vb\">Try\nCatch ex As ArgumentException When ex.ParamName = NameOf(Name)\n\t' No C# equivalent for When\n\tThrow\nCatch ex As Exception\nFinally\n\tThrow New Exception()\nEnd Try\n<\/code><\/pre>\n<p><strong>Extension Methods<\/strong>:<\/p>\n<pre><code class=\"language-vb\">Module StringExtensions\n\t&lt;Extension()&gt;\n\tPublic Function Vowels(ByVal s As String) As Integer\n\t\t' public static int Vowels(this string s) {}\n\t\tReturn s.Count(Function(c) \"aeiou\".Contains(Char.ToLower(c)))\n\tEnd Function\nEnd Module\n<\/code><\/pre>\n<p><strong>Using<\/strong>:<\/p>\n<pre><code class=\"language-vb\">Using r As StreamReader = File.OpenText(\"file.txt\")\nEnd Using\n<\/code><\/pre>\n<p><strong>Yield<\/strong>:<\/p>\n<pre><code class=\"language-vb\">Iterator Function Iterate() As IEnumerable(Of Integer)\n\tYield 5\n\tYield 7\nEnd Function\n<\/code><\/pre>\n<hr \/>\n<h2 id=\"dangers-of-vb6-legacy\">Dangers of VB6 Legacy<\/h2>\n<p>A new VB.NET project starts with <code>Option Strict Off<\/code> and <code>Option Explicit Off<\/code>. This is bad.<br \/> \u2026 Unless you are a JavaScript developer, then you can just continue to do whatever you want!<\/p>\n<pre><code class=\"language-vb\">' VB.NET\nDim name = \"string\"\nname = 15\n' name is now an integer or a string.. depending whether `Option Infer` is On or Off.\nuhoh = 20 ' With `Option Explicit Off` this *will* compile.\n\n\/\/ C# equivalent\nobject name = \"string\";\n<\/code><\/pre>\n<p>That\u2019s obviously not what one wants. Emulating C#\u2019s <code>var name = \"str\"<\/code> behavior can be achieved by turning <code>Option Strict On<\/code> and <code>Option Infer On<\/code> in the Project Properties Compile tab.<\/p>\n<h3 id=\"stuff-that-was-imported-from-vb6\">Stuff that was imported from VB6<\/h3>\n<p>They are listed here, but you may skip this part and pretend it never happened.<\/p>\n<pre><code class=\"language-vb\">' IIf always evaluates both branches. Use If() instead!\nDim result = IIf(someBool, \"truthyCase\", \"falsyCase\")\n\n' Multiple statements on one line.\nIf True Then s = \"1\": s = \"2\"\n\n' Who wouldn't want a good ol' GoTo in their code base\nOn Error GoTo MyErrorHandler\nMyErrorHandler: Console.WriteLine(Err.Description)\n<\/code><\/pre>\n<h3 id=\"microsoftvisualbasic-namespace\">Microsoft.VisualBasic namespace<\/h3>\n<p><code>Microsoft.VisualBasic.Strings<\/code>:<br \/> If you want to forego Object Oriented, the whole set of VB6 string methods is available.<\/p>\n<pre><code>UCase, Len, Replace, Format, Left, Mid, Trim, ...\n\n' Mid can be called like this because Microsoft.VisualBasic.Strings is a Module\nDim s = Mid(\"testing\", 2, 3)   ' est\n<\/code><\/pre>\n<p><code>Microsoft.VisualBasic.Constants<\/code>:<\/p>\n<ul>\n<li>vbCancel = MsgBoxResult.Cancel<\/li>\n<li>vbNullString = Nothing<\/li>\n<li>vbLongDate = DateFormat.LongDate<\/li>\n<li>vbHidden = FileAttribute.Hidden<\/li>\n<li>VbFalse = TriState.False<\/li>\n<\/ul>\n<p><code>Microsoft.VisualBasic.DateAndTime<\/code>:<\/p>\n<ul>\n<li>DateAdd, DatePart, WeekDayName, \u2026<\/li>\n<\/ul>\n<p><code>Microsoft.VisualBasic.FileSystem<\/code>:<br \/> ChDrive, SetAttr, Lock, Seek, CurDir, Input \u2026<br \/> It\u2019s probably a good idea to steer away from these and stick to System.IO and Streams.<\/p>\n<p><code>Microsoft.VisualBasic.Interaction<\/code>:<\/p>\n<ul>\n<li>Beep: Ow yeah\u2026<\/li>\n<li>SaveSetting\/DeleteSetting: in the registry<\/li>\n<li>InputBox<\/li>\n<li>Environ: Get system environment variables<\/li>\n<li>Shell: Run an executable program<\/li>\n<\/ul>\n<p><code>Microsoft.VisualBasic.Devices<\/code>:<\/p>\n<ul>\n<li>Audio: Play, [Stop]<\/li>\n<li>Clock: LocalTime, GmtTime<\/li>\n<li>Keyboard: ShiftKeyDown, NumLock, \u2026<\/li>\n<li>Computer: Clipboard, Ports, Mouse, Screen, \u2026<\/li>\n<li>ComputerInfo: OSFullName, TotalPhysicalMemory, AvailableVirtualMemory, \u2026<\/li>\n<li>Network: DownloadFile, UploadFile, Ping, NetworkAvailabilityChanged<\/li>\n<\/ul>\n<p><code>Microsoft.VisualBasic.Information<\/code>:<\/p>\n<ul>\n<li>IsNumeric, IsDate, IsArray, L\/UBound, RGB, \u2026<\/li>\n<\/ul>\n<p><code>Microsoft.VisualBasic.Logging<\/code>:<\/p>\n<ul>\n<li>Write to the Application EventLog.<\/li>\n<\/ul>\n<hr \/>\n<h2 id=\"available-in-c-only\">Available in C# only<\/h2>\n<p>The only real blocker against VB.NET is unsafe and checked\/unchecked code. But if you really need to be working unsafely, perhaps you should consider not using .NET.<\/p>\n<p>There is other C# only stuff that has already been covered (ex: Out parameters) and there is more like multi line comments and <code>a++<\/code> but nothing serious that can\u2019t be worked around with some additional statements in VB.NET.<\/p>\n<p>This somewhat changes with C# 7 features that have not been implemented for VB.NET:<\/p>\n<ul>\n<li>Out variables: <code>int.TryParse(s, out var i)<\/code><\/li>\n<li>Pattern Matching: <code>o is int i<\/code>, switch<\/li>\n<li><code>return ref x;<\/code><\/li>\n<li>Tuples<\/li>\n<\/ul>\n<hr \/>\n<h2 id=\"available-in-vbnet-only\">Available in VB.NET only<\/h2>\n<p>Many things have been covered already:<\/p>\n<ul>\n<li>More versatile switch<\/li>\n<li>Extra Linq query keywords (Take, Skip, Distinct, \u2026)<\/li>\n<li><code>Key<\/code> keyword for anonymous types<\/li>\n<li>Like operator for simple string matching<\/li>\n<li>Static local variables<\/li>\n<li>Modules: Which can be (sort of) emulated with <code>static class<\/code> and static using statements.<\/li>\n<li>When blocks in exceptions<\/li>\n<li>Inline DateTime declarations<\/li>\n<li>Passing properties ByRef<\/li>\n<\/ul>\n<p><strong>With<\/strong><\/p>\n<pre><code class=\"language-vb\">With hero\n\t.Name = \"SpamMan\"\n\t.PowerLevel = 3\nEnd With\n<\/code><\/pre>\n<p><strong>WithEvents and Handles<\/strong>:<\/p>\n<pre><code class=\"language-vb\">Dim WithEvents Button1 As New Button\n\nSub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click\nEnd Sub\n<\/code><\/pre>\n<p><strong>My namespace<\/strong><br \/> A whole bunch of convenience methods in <code>Microsoft.VisualBasic.ApplicationServices<\/code>.<\/p>\n<ul>\n<li><code>My.Application<\/code>: CommandLineArgs, Culture, \u2026<\/li>\n<li><code>My.Computer<\/code>: Like Microsoft.VisualBasic.Devices<\/li>\n<li><code>My.User<\/code>: CurrentPrincipal, IsAuthenticated, IsInRole<\/li>\n<li><code>My.Settings<\/code>: Working with app.config AppSettings<\/li>\n<li><code>My.Resources<\/code>: Easily get a resources as string or stream<\/li>\n<\/ul>\n<p><strong>XML Literals<\/strong><br \/> When you want to quickly build some Xml, VB.NET Xml literals can come in quite handy.<\/p>\n<pre><code class=\"language-vb\">Dim xml As XElement = \n\t&lt;Root&gt;\n\t\t&lt;Title&gt;Xml Literals&lt;\/Title&gt;\n\t\t&lt;Items&gt;\n\t\t\t&lt;Item Type=\"Date\"&gt;&lt;%= Datetime.Now %&gt;&lt;\/Item&gt;\n\t\t\t&lt;Item Type=\"String\"&gt;Whoah&lt;\/Item&gt;\n\t\t&lt;\/Items&gt;\n\t &lt;\/Root&gt;\n<\/code><\/pre>\n<p>You can even build Xml with dynamic node names and by meshing in some Linq. It\u2019s probably more a thing for migration and test code and not so much for production code.<\/p>\n<pre><code class=\"language-vb\">Dim persons = \n\t&lt;Persons&gt;\n\t\t&lt;%= From p In persons Select &lt;Person&gt;&lt;%= p.Name %&gt;&lt;\/Person&gt; %&gt;\n\t&lt;\/Persons&gt;\n<\/code><\/pre>\n<p>Getting stuff out of XElement is also very nicely done:<\/p>\n<pre><code class=\"language-vb\">Dim title = xml.&lt;Root&gt;.&lt;Title&gt;.Value\nDim nowNode = xml...&lt;Item&gt;.First()\nDim nowTypeAttribute = nowNode.@Type\nDim nowNodeText = nowNode.Value\n<\/code><\/pre>\n<hr \/>\n<h2 id=\"conversion-troubles\">Conversion troubles<\/h2>\n<p>While there are some online converters, they are not at all up to date, or very smart.<\/p>\n<ul>\n<li><a href=\"http:\/\/www.carlosag.net\/tools\/codetranslator\/\">Carlosag converter<\/a><\/li>\n<li><a href=\"http:\/\/converter.telerik.com\/\">Telerik converter<\/a> &lt;- If you must, take this one<\/li>\n<\/ul>\n<p>They do not provide much more than a starting point.<\/p>\n<ul>\n<li>Using an array accessor in VB.NET (<code>arr(0)<\/code> vs <code>arr[0]<\/code>) results in an incorrect translation<\/li>\n<li>\u201cNewer\u201d features, like lambdas are converted to dynamic, or not at all<\/li>\n<li>Use any VB.NET or C# only feature and they won\u2019t even make an attempt at converting it<\/li>\n<\/ul>\n<hr \/>\n<h2 id=\"summary\">Summary<\/h2>\n<p><strong>So which is best<\/strong><br \/> (just kidding:)<\/p>\n<p>VB.NET used to be lacking many convenient C# features (using, yield, \u2026). While it has mostly catched up, C# proves to be a moving target.<\/p>\n<p>Properties used to be a real pain in VB.NET. A one liner syntax is now available like <code>Property Start As Date<\/code>. But by now C# already introduced property expression bodies leaving VB.NET behind again.<\/p>\n<p>For a long time VB.NET switch statement used to be more versatile but with the implementation of Pattern Matching in C# this is no longer the case.<\/p>\n<p>Lambda syntax like <code>o.Where(Function(x As Integer) x &lt; 0)<\/code> isn\u2019t going to win any prizes when camped against C#\u2019s <code>o.Where((int x) =&gt; x &lt; 0)<\/code>\u2026 But at least it\u2019s there \ud83d\ude42<\/p>\n<p>I\u2019m probably a <em>little<\/em> biased towards C# because of the more succinct syntax and because the vast majority of online examples are written in C# while the free conversion tools are severely lacking.<\/p>\n<p>It\u2019s perhaps worth mentioning that VB.NET and Resharper are not on the best of terms.<\/p>\n<p>Unless you really need some of the VB.NET or C# only features, choosing one over the other should probably still be a team decision.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A cheat sheet outlining the syntax differences between VB.NET and C#. This post is written specifically for advanced C# developers with little to no VB.NET knowledge who need to do some VB.NET coding.<\/p>\n<p class=\"notice--info\">Because some things are just so similar but still confusingly different in VB.NET vs C#\u2026<\/p>\n<p>Along the way we\u2019ll make some amazing discoveries like:<\/p>\n<ul>\n<li>There are things VB.NET just can\u2019t do (pointers, \u2026)<\/li>\n<li>There are a few cases where VB.NET code is <em>shorter<\/em> than its C# counterpart (gasp!)<\/li>\n<li>VB.NET defaults are not what you might expect from a strongly typed language due to its VB6 legacy (Option Strict, Explicit)<\/li>\n<li>There is some VB.NET only stuff that comes in handy from time to time<\/li>\n<\/ul>\n","protected":false},"author":1,"featured_media":2121,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[11],"tags":[13],"class_list":["post-1700","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dotnet","tag-cheat-sheet"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>VB.NET vs C# Syntax differences - Itenium<\/title>\n<meta name=\"robots\" content=\"noindex, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"VB.NET vs C# Syntax differences - Itenium\" \/>\n<meta property=\"og:description\" content=\"A cheat sheet outlining the syntax differences between VB.NET and C#. This post is written specifically for advanced C# developers with little to no VB.NET knowledge who need to do some VB.NET coding.Because some things are just so similar but still confusingly different in VB.NET vs C#\u2026Along the way we\u2019ll make some amazing discoveries like:There are things VB.NET just can\u2019t do (pointers, \u2026)There are a few cases where VB.NET code is shorter than its C# counterpart (gasp!)VB.NET defaults are not what you might expect from a strongly typed language due to its VB6 legacy (Option Strict, Explicit)There is some VB.NET only stuff that comes in handy from time to time\" \/>\n<meta property=\"og:url\" content=\"https:\/\/demo.sidekick.be\/itenium\/blog\/dotnet\/vbnet-vs-csharp\/\" \/>\n<meta property=\"og:site_name\" content=\"Itenium\" \/>\n<meta property=\"article:published_time\" content=\"2017-04-15T11:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-11-28T12:31:47+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/demo.sidekick.be\/itenium\/wp-content\/uploads\/2025\/11\/csharp-vs-vbnet.png\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"136\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Usdevelop\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Usdevelop\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"13 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/demo.sidekick.be\/itenium\/blog\/dotnet\/vbnet-vs-csharp\/\",\"url\":\"https:\/\/demo.sidekick.be\/itenium\/blog\/dotnet\/vbnet-vs-csharp\/\",\"name\":\"VB.NET vs C# Syntax differences - Itenium\",\"isPartOf\":{\"@id\":\"https:\/\/demo.sidekick.be\/itenium\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/demo.sidekick.be\/itenium\/blog\/dotnet\/vbnet-vs-csharp\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/demo.sidekick.be\/itenium\/blog\/dotnet\/vbnet-vs-csharp\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/demo.sidekick.be\/itenium\/wp-content\/uploads\/2025\/11\/csharp-vs-vbnet.png\",\"datePublished\":\"2017-04-15T11:00:00+00:00\",\"dateModified\":\"2025-11-28T12:31:47+00:00\",\"author\":{\"@id\":\"https:\/\/demo.sidekick.be\/itenium\/#\/schema\/person\/6ab401ce01e858184ee4a8667fe0f022\"},\"breadcrumb\":{\"@id\":\"https:\/\/demo.sidekick.be\/itenium\/blog\/dotnet\/vbnet-vs-csharp\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/demo.sidekick.be\/itenium\/blog\/dotnet\/vbnet-vs-csharp\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/demo.sidekick.be\/itenium\/blog\/dotnet\/vbnet-vs-csharp\/#primaryimage\",\"url\":\"https:\/\/demo.sidekick.be\/itenium\/wp-content\/uploads\/2025\/11\/csharp-vs-vbnet.png\",\"contentUrl\":\"https:\/\/demo.sidekick.be\/itenium\/wp-content\/uploads\/2025\/11\/csharp-vs-vbnet.png\",\"width\":150,\"height\":136},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/demo.sidekick.be\/itenium\/blog\/dotnet\/vbnet-vs-csharp\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/demo.sidekick.be\/itenium\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"VB.NET vs C# Syntax differences\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/demo.sidekick.be\/itenium\/#website\",\"url\":\"https:\/\/demo.sidekick.be\/itenium\/\",\"name\":\"Itenium\",\"description\":\"We build software. We build careers.\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/demo.sidekick.be\/itenium\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/demo.sidekick.be\/itenium\/#\/schema\/person\/6ab401ce01e858184ee4a8667fe0f022\",\"name\":\"Usdevelop\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/demo.sidekick.be\/itenium\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/cc8cf9b9e9d5bbe7e8d247907cc9ac8457bbfa2854b52eaddf6529adfe88ceab?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/cc8cf9b9e9d5bbe7e8d247907cc9ac8457bbfa2854b52eaddf6529adfe88ceab?s=96&d=mm&r=g\",\"caption\":\"Usdevelop\"},\"sameAs\":[\"https:\/\/demo.sidekick.be\/itenium\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"VB.NET vs C# Syntax differences - Itenium","robots":{"index":"noindex","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"og_locale":"en_US","og_type":"article","og_title":"VB.NET vs C# Syntax differences - Itenium","og_description":"A cheat sheet outlining the syntax differences between VB.NET and C#. This post is written specifically for advanced C# developers with little to no VB.NET knowledge who need to do some VB.NET coding.Because some things are just so similar but still confusingly different in VB.NET vs C#\u2026Along the way we\u2019ll make some amazing discoveries like:There are things VB.NET just can\u2019t do (pointers, \u2026)There are a few cases where VB.NET code is shorter than its C# counterpart (gasp!)VB.NET defaults are not what you might expect from a strongly typed language due to its VB6 legacy (Option Strict, Explicit)There is some VB.NET only stuff that comes in handy from time to time","og_url":"https:\/\/demo.sidekick.be\/itenium\/blog\/dotnet\/vbnet-vs-csharp\/","og_site_name":"Itenium","article_published_time":"2017-04-15T11:00:00+00:00","article_modified_time":"2025-11-28T12:31:47+00:00","og_image":[{"width":150,"height":136,"url":"https:\/\/demo.sidekick.be\/itenium\/wp-content\/uploads\/2025\/11\/csharp-vs-vbnet.png","type":"image\/png"}],"author":"Usdevelop","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Usdevelop","Est. reading time":"13 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/demo.sidekick.be\/itenium\/blog\/dotnet\/vbnet-vs-csharp\/","url":"https:\/\/demo.sidekick.be\/itenium\/blog\/dotnet\/vbnet-vs-csharp\/","name":"VB.NET vs C# Syntax differences - Itenium","isPartOf":{"@id":"https:\/\/demo.sidekick.be\/itenium\/#website"},"primaryImageOfPage":{"@id":"https:\/\/demo.sidekick.be\/itenium\/blog\/dotnet\/vbnet-vs-csharp\/#primaryimage"},"image":{"@id":"https:\/\/demo.sidekick.be\/itenium\/blog\/dotnet\/vbnet-vs-csharp\/#primaryimage"},"thumbnailUrl":"https:\/\/demo.sidekick.be\/itenium\/wp-content\/uploads\/2025\/11\/csharp-vs-vbnet.png","datePublished":"2017-04-15T11:00:00+00:00","dateModified":"2025-11-28T12:31:47+00:00","author":{"@id":"https:\/\/demo.sidekick.be\/itenium\/#\/schema\/person\/6ab401ce01e858184ee4a8667fe0f022"},"breadcrumb":{"@id":"https:\/\/demo.sidekick.be\/itenium\/blog\/dotnet\/vbnet-vs-csharp\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/demo.sidekick.be\/itenium\/blog\/dotnet\/vbnet-vs-csharp\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/demo.sidekick.be\/itenium\/blog\/dotnet\/vbnet-vs-csharp\/#primaryimage","url":"https:\/\/demo.sidekick.be\/itenium\/wp-content\/uploads\/2025\/11\/csharp-vs-vbnet.png","contentUrl":"https:\/\/demo.sidekick.be\/itenium\/wp-content\/uploads\/2025\/11\/csharp-vs-vbnet.png","width":150,"height":136},{"@type":"BreadcrumbList","@id":"https:\/\/demo.sidekick.be\/itenium\/blog\/dotnet\/vbnet-vs-csharp\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/demo.sidekick.be\/itenium\/"},{"@type":"ListItem","position":2,"name":"VB.NET vs C# Syntax differences"}]},{"@type":"WebSite","@id":"https:\/\/demo.sidekick.be\/itenium\/#website","url":"https:\/\/demo.sidekick.be\/itenium\/","name":"Itenium","description":"We build software. We build careers.","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/demo.sidekick.be\/itenium\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/demo.sidekick.be\/itenium\/#\/schema\/person\/6ab401ce01e858184ee4a8667fe0f022","name":"Usdevelop","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/demo.sidekick.be\/itenium\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/cc8cf9b9e9d5bbe7e8d247907cc9ac8457bbfa2854b52eaddf6529adfe88ceab?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/cc8cf9b9e9d5bbe7e8d247907cc9ac8457bbfa2854b52eaddf6529adfe88ceab?s=96&d=mm&r=g","caption":"Usdevelop"},"sameAs":["https:\/\/demo.sidekick.be\/itenium"]}]}},"_links":{"self":[{"href":"https:\/\/demo.sidekick.be\/itenium\/wp-json\/wp\/v2\/posts\/1700","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/demo.sidekick.be\/itenium\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/demo.sidekick.be\/itenium\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/demo.sidekick.be\/itenium\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/demo.sidekick.be\/itenium\/wp-json\/wp\/v2\/comments?post=1700"}],"version-history":[{"count":3,"href":"https:\/\/demo.sidekick.be\/itenium\/wp-json\/wp\/v2\/posts\/1700\/revisions"}],"predecessor-version":[{"id":2323,"href":"https:\/\/demo.sidekick.be\/itenium\/wp-json\/wp\/v2\/posts\/1700\/revisions\/2323"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/demo.sidekick.be\/itenium\/wp-json\/wp\/v2\/media\/2121"}],"wp:attachment":[{"href":"https:\/\/demo.sidekick.be\/itenium\/wp-json\/wp\/v2\/media?parent=1700"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/demo.sidekick.be\/itenium\/wp-json\/wp\/v2\/categories?post=1700"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/demo.sidekick.be\/itenium\/wp-json\/wp\/v2\/tags?post=1700"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}