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

compile time assert

P: n/a
Hi,

Is there any way in C# to perform a compile-time-assert (like
BOOST_STATIC_ASSERT in C++)?

Thanks a lot.
Marco.
Nov 16 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Marco,

No, I don't believe there is. With MSBUILD though (the new build system
with .NET 2.0), you can create your own tasks to check the conditions that
you want to check, and fail the process if the conditions are not met. This
will also work in VS.NET, as it uses the MSBUILD system for it's build
process as well.

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

"marco_segurini" <ma***********@virgilio.it> wrote in message
news:a3**************************@posting.google.c om...
Hi,

Is there any way in C# to perform a compile-time-assert (like
BOOST_STATIC_ASSERT in C++)?

Thanks a lot.
Marco.

Nov 16 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.