nope Sam - no equivelent - const and readonly member variables but no
concept on constness on parameters or methods

Richard
http://staff.develop.com/richardb

-----Original Message-----
From: dotnet discussion [mailto:[EMAIL PROTECTED]]On Behalf Of
Sam Gentile
Sent: 22 May 2002 22:22
To: [EMAIL PROTECTED]
Subject: [DOTNET] Does C# have equivalent of C++ const
parameters/methods?


I haven't found this in C#. Does C# have the equivalent of C++'s const
parameters or const methods? This is common in C++:
void Foo(const string& str)

Even with MC++, it appears that although const parameters can be used in the
methods of a managed class, methods themselves cannot be defined as const.

---------------------
Sam Gentile
.NET Consultant
Co-author: Wrox Visual C++ .NET: A primer for C++ developers
BLOG: http://radio.weblogs.com/0105852/
http://www.project-inspiration.com/sgentile/DotNet.htm
http://www.project-inspiration.com/sgentile/
---------------------------




_________________________________________________________________
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx

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