Quantcast
Channel: ClearScript
Viewing all articles
Browse latest Browse all 2297

New Post: Problem with nullable property of object

0
0
If we understand correctly, standard .NET marshaling is wrong for your original scenario at the top of this thread, because it always turns .NET null into VBScript empty, whereas your script code expects nothing.
No, standard .NET marshaling works as expected, .NET Com object (not string) in case of null marshaled as Nothing, because property Class2 have type of MyClass2 and not string, object and etc.
That problem of ClearScript marshaling
public class MyClass
{
    public MyClass2 Class2 { get; set; } 
}

public class MyClass2
{
     
}

Viewing all articles
Browse latest Browse all 2297