Right, but the VB.NET eqivalent of this:

using (Bitmap foo = new Bitmap())
{
    ...
}

Would be all of this:

Dim foo As Bitmap = New Bitmap()

Try
    ...
End Try
Finally
    If foo <> Nothing Then
        CType(foo, Idisposable).Dispose()
End Finally

There isn't any direct eqivalent.

> -----Original Message-----
> From: dotnet discussion [mailto:[EMAIL PROTECTED]]
> On Behalf Of franklin gray
> Sent: Wednesday, May 01, 2002 3:54 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [DOTNET] From C# to VB.NET
>
>
> In the archives (within the last two weeks) there is a link
> to a web page that can translate C# to VB.net.
>
> -----Original Message-----
> From: Joel Mueller [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, May 01, 2002 3:52 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [DOTNET] From C# to VB.NET
>
>
> There isn't one, as far as I know.
>
> > -----Original Message-----
> > From: dotnet discussion [mailto:[EMAIL PROTECTED]]
> > On Behalf Of Henrik Enemark Rasmussen
> > Sent: Wednesday, May 01, 2002 3:40 PM
> > To: [EMAIL PROTECTED]
> > Subject: [DOTNET] From C# to VB.NET
> >
> >
> > Hello All
> >
> > What is the VB.NET equivalent to the C# 'using' statement (not the
> > 'using'
> > directive) ?
> >
> > Regards
> > Henrik
> >
> > You can read messages from the DOTNET archive, unsubscribe from
> > DOTNET, or subscribe to other DevelopMentor lists at
> > http://discuss.develop.com.
> >
> >
>
> You can read messages from the DOTNET archive, unsubscribe
> from DOTNET, or subscribe to other DevelopMentor lists at
> http://discuss.develop.com.
>
> You can read messages from the
> DOTNET archive, unsubscribe from DOTNET, or subscribe to
> other DevelopMentor lists at http://discuss.develop.com.
>
>

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to