Thank both of you for your help. I missed one ) in my post but didn't miss
it in my original codes. I didn't understand the message that said that the
"Viewstate denotes a 'property' where a method was expected" until after
you pointed out the error with my using () instead of [].
Now my first question is solved but my second question still stands. Do you
know any site where I can look up C# syntaxes corresponding to those of
VB.NET?
Thank you.
VC said:
I am new to both C# and ASP.NET. I want to convert the VB.NET codes
below
to
C#:
Dim localColor As System.Drawing.Color
localColor = CType(ViewState("labelColor"), System.Drawing.Color)
I got an compilation error when I try the following code:
System.Drawing.Color localColor;
localColor = (System.Drawing.Color)(ViewState("labelColor");
Could someone tell me what is the equivalent codes in C#?
Also is there any site that shows all the C# syntaxes corresponding to those
of VB.NET?