Re: VB.Net Syntax...
From: Kevin Spencer (kevin_at_takempis.com)
Date: 03/02/04
- Next message: Kevin Spencer: "Re: Onmouseover"
- Previous message: David Elliott: "Re: ASP.Net Page that has a control to display HTML"
- In reply to: Teemu Keiski: "Re: VB.Net Syntax..."
- Next in thread: Teemu Keiski: "Re: VB.Net Syntax..."
- Reply: Teemu Keiski: "Re: VB.Net Syntax..."
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 2 Mar 2004 08:10:25 -0500
> BTW: Having "WebForm1 wf1;" does not create an instance of it, it declares
a
> member variable (or local variable) which is of type WebForm1 (but
> uninitialized). Creating instance means when you create new instance with
> 'new' keyword (with classes) or assign primitive type to variable (with
> value types where having literal can be understood as creating new
instance
> as well). Oh well, any way. :-)
Wait a second! He's assigning a value to it, which means that it is not
necessary or desirable to create a new instance.
-- HTH, Kevin Spencer .Net Developer Microsoft MVP Big things are made up of lots of little things. "Teemu Keiski" <joteke@aspalliance.com> wrote in message news:O52G$$CAEHA.3308@TK2MSFTNGP10.phx.gbl... > Hi, > > Just raw translation: > > Dim wf1 As WebForm1=CType(Context.Handler,WebForm1) > Label1.Text=wf1.Name > Label2.Text=wf1.Email > > BTW: Having "WebForm1 wf1;" does not create an instance of it, it declares a > member variable (or local variable) which is of type WebForm1 (but > uninitialized). Creating instance means when you create new instance with > 'new' keyword (with classes) or assign primitive type to variable (with > value types where having literal can be understood as creating new instance > as well). Oh well, any way. :-) > > -- > Teemu Keiski > MCP, Microsoft MVP (ASP.NET), AspInsiders member > ASP.NET Forum Moderator, AspAlliance Columnist > > > "Jimmy" <JimmyNWK@yahoo.com> wrote in message > news:eFRS6WCAEHA.1468@tk2msftngp13.phx.gbl... > > I have C# code as follows. > > //create instance of source web form > > WebForm1 wf1; > > //get reference to current handler instance > > wf1=(WebForm1)Context.Handler; > > Label1.Text=wf1.Name; > > Label2.Text=wf1.EMail; > > > > What is the equivavlent code in VB.Net ? > > I am writing application in ASP.Net. > > Thanks, > > Jimmy > > > > > >
- Next message: Kevin Spencer: "Re: Onmouseover"
- Previous message: David Elliott: "Re: ASP.Net Page that has a control to display HTML"
- In reply to: Teemu Keiski: "Re: VB.Net Syntax..."
- Next in thread: Teemu Keiski: "Re: VB.Net Syntax..."
- Reply: Teemu Keiski: "Re: VB.Net Syntax..."
- Messages sorted by: [ date ] [ thread ]