Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net Building Controls (http://www.velocityreviews.com/forums/f59-asp-net-building-controls.html)
-   -   Last one for now... How do I convert this C# code to VB.NET (http://www.velocityreviews.com/forums/t756157-last-one-for-now-how-do-i-convert-this-c-code-to-vb-net.html)

Wayne 11-29-2003 11:24 PM

Last one for now... How do I convert this C# code to VB.NET
 
C#

if (s is MyPanelStyle) {
....
}



I thought this would work but it is not...


If s is MyStyles.Button Then
....
End If


....but I get a blue squiggly 'Button' is type in 'MyStyles' and cannot be
used as an expression.



Teemu Keiski 11-30-2003 03:30 PM

Re: Last one for now... How do I convert this C# code to VB.NET
 
If TypeOf(s) Is MyPanelStyle Then
....
End If

--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist

"Wayne" <waynesellars@hotmail.com> wrote in message
news:eu%23nzAttDHA.2880@tk2msftngp13.phx.gbl...
> C#
>
> if (s is MyPanelStyle) {
> ...
> }
>
>
>
> I thought this would work but it is not...
>
>
> If s is MyStyles.Button Then
> ...
> End If
>
>
> ...but I get a blue squiggly 'Button' is type in 'MyStyles' and cannot be
> used as an expression.
>
>




Wendy Wei 12-03-2003 10:27 PM

Re: Last one for now... How do I convert this C# code to VB.NET
 
"Wayne" <waynesellars@hotmail.com> wrote in message news:<eu#nzAttDHA.2880@tk2msftngp13.phx.gbl>...
> C#
>
> if (s is MyPanelStyle) {
> ...
> }
>
>
>
> I thought this would work but it is not...
>
>
> If s is MyStyles.Button Then
> ...
> End If
>
>
> ...but I get a blue squiggly 'Button' is type in 'MyStyles' and cannot be
> used as an expression.


Try TypeOf s is MyStyles.Button


All times are GMT. The time now is 05:37 AM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57