![]() |
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. |
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. > > |
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.