vb.net set object as class code example Example: return new object vb.net Dim anonymousCust = New With {.Name = "Hugo Garcia"}