Last post Mar 16, 2011 07:45 AM by rezelute
Mar 16, 2011 06:49 AM|rezelute|LINK
To declare an object in JS i can simply do the following:
var house = new Object();
In asp.net (VB) if i try doing the same
Dim house = new Object()
i get an error:
System.MissingMemberException: Public member 'window' on type 'Object' not found.
Do i have to create a house class before i can reference house.window? Is there no way to do it without creating a class?
Mar 16, 2011 07:42 AM|XIII|LINK
in C# 4.0 you have the dynamic keyword which makes such scenario possible. However it's not there yet for VB.NET apparently.
So for VB.NET you have to create a class first and then make use of the properties you give it.
Mar 16, 2011 07:45 AM|rezelute|LINK
Thank you for the confirmation, classes it is then :)