473,379 Members | 1,252 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

C3842

What is the reason for C3842?
'function': 'const' and 'volatile' qualifiers on member functions of
managed types are not supported

--
Daniel
Jul 21 '05 #1
4 1829
Daniel Lidström <so*****@microsoft.com> wrote:
What is the reason for C3842?
'function': 'const' and 'volatile' qualifiers on member functions of
managed types are not supported


The CLR just doesn't have the concept of const or volatile except for
fields.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Jul 21 '05 #2
On Wed, 22 Sep 2004 08:38:32 +0100, Jon Skeet [C# MVP] wrote:
Daniel Lidström <so*****@microsoft.com> wrote:
What is the reason for C3842?
'function': 'const' and 'volatile' qualifiers on member functions of
managed types are not supported


The CLR just doesn't have the concept of const or volatile except for
fields.


Isn't this a compile-time issue?

--
Daniel
Jul 21 '05 #3
Daniel Lidström <so*****@microsoft.com> wrote:
On Wed, 22 Sep 2004 08:38:32 +0100, Jon Skeet [C# MVP] wrote:
Daniel Lidström <so*****@microsoft.com> wrote:
What is the reason for C3842?
'function': 'const' and 'volatile' qualifiers on member functions of
managed types are not supported


The CLR just doesn't have the concept of const or volatile except for
fields.


Isn't this a compile-time issue?


Not really. Unless the CLR has some concept of "constness", it won't be
in the assembly format, which means you wouldn't be able to use it when
compiling against other libraries.

You could have constness for internal methods and types (if C# had such
a concept, which it doesn't) but it wouldn't be very elegant to be so
restricted.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Jul 21 '05 #4
Jon Skeet [C# MVP] <sk***@pobox.com> wrote:
You could have constness for internal methods and types (if C# had such
a concept, which it doesn't) but it wouldn't be very elegant to be so
restricted.


Ignore this part of my post - presumably you're working in MC++ rather
than C#?

I still think it wouldn't be terribly elegant to have constness for
internal things but not publicly visible things.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Jul 21 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Daniel Lidström | last post by:
What is the reason for C3842? 'function': 'const' and 'volatile' qualifiers on member functions of managed types are not supported -- Daniel
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.