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

CodeDom and regions

P: n/a
I'm part way through a project which will create Data Access classes for SQL
Server database more or less automatically from the table definitions in the
DB itself.

I sort of get the CodeDom model (though I expect to HATE having to actually
learn to use it!), but what I can't see is how to define or find #regions in
the code.

You see, I'd like to put my boilerplate code in regions so that if (when)
there is a need to update the code (due to DB changes) then any changes made
by the user will be retained (extra methods and so on).

Any help would be appreciated.

Iain
Nov 16 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
So if I wanted to find them I would have to parse the text in the class?

OK. Thanks.

Iain
"Charlie Williams" <an*******@discussions.microsoft.com> wrote in message
news:14**********************************@microsof t.com...
You won't find support for regions in the CodeDom because they are not

related to the language in any way. They are simply an IDE convenience and
are ignored by the compiler.
Nov 16 '05 #2

P: n/a
hi Iain
you can easly define #if declarative in your c# code ( i don't see what
exactly is the problem in that )
# If ConstantExpression [ Then ] LineTerminator
[ ConditionalElement+ ]
[ ConditionalElseIfGroup+ ]
[ ConditionalElseGroup ]
# End If LineTerminator
hope that would help

Mohamed Mahfouz
MEA Developer Support Center
ITworx on behalf of Microsoft EMEA GTSC

Nov 16 '05 #3

P: n/a
You won't find support for regions in the CodeDom because they are not related to the language in any way. They are simply an IDE convenience and are ignored by the compiler.
Nov 16 '05 #4

P: n/a
So if I wanted to find them I would have to parse the text in the class?

OK. Thanks.

Iain
"Charlie Williams" <an*******@discussions.microsoft.com> wrote in message
news:14**********************************@microsof t.com...
You won't find support for regions in the CodeDom because they are not

related to the language in any way. They are simply an IDE convenience and
are ignored by the compiler.
Nov 16 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.