By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,200 Members | 1,629 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,200 IT Pros & Developers. It's quick & easy.

CodeDom using statement

P: n/a
Hi,

Is there a way to declare a using statement with the CodeDom?

Something like:

using (obj = new Object())
{
obj.DoSomething;
}
Thanks,
Pascal Pare

Nov 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Pascal,

Probably not, because this isn't something that is guaranteed to exist
across languages (the using statement compiles to a try/finally statement
ultimately). You wil have to create the full expansion that the compiler
does.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

<pa*********@hotmail.com> wrote in message
news:11**********************@g47g2000cwa.googlegr oups.com...
Hi,

Is there a way to declare a using statement with the CodeDom?

Something like:

using (obj = new Object())
{
obj.DoSomething;
}
Thanks,
Pascal Pare

Nov 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.