473,379 Members | 1,377 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.

Are compiler #Pragma equivalents supported in C#?

I'm looking for a way to suppress the CS0659 compiler warning message about
class overrides Equals but does not provide a GetHashCode() override. In
C++ VS allows this through the use of the #Pragma statement. Does VS.NET
have the equivalent?

Gary ...

Nov 16 '05 #1
1 1732
Gary,

Pragma statements are not part of the C# language. However, you can
suppress the warning options through the /nowarn flag (if using CSC on the
command line). This allows you to specify which warnings to not have
appear.

Also, you can set the properties on the project to ignore these
warnings, by going to the properties for the project, and then going to
"Configuration Properties | Build". There is a property "Suppress Specific
Warnings" which you want to set to the warnings you want to suppress.

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

"Gary James" <ga***@iotech.com> wrote in message
news:Ou**************@TK2MSFTNGP09.phx.gbl...
I'm looking for a way to suppress the CS0659 compiler warning message about class overrides Equals but does not provide a GetHashCode() override. In
C++ VS allows this through the use of the #Pragma statement. Does VS.NET
have the equivalent?

Gary ...

Nov 16 '05 #2

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

Similar topics

2
by: Ágoston Bejó | last post by:
Hi there, In the old Pascal-times, you could set compiler switches in the source code, with a syntax like {$G+}, things like that (I don't remember them accurately anymore). Is there something...
3
by: Simba | last post by:
Hi, I've written some javascript routines for Internet Explorer and Opera. Could you tell me the Netscape and Mozilla equivalents? Thanks ------------------------- //this works with...
37
by: Jeff Thies | last post by:
There's a number of elements that I set attributes for: <table border="1" cellpadding="3" cellspacing="0">.. <img align="middle"> Are there CSS equivalents for any of these? Jeff
7
by: Matthew Del Buono | last post by:
Don't try to solve the problem. I've found a way -- around or fixing it. I'm just curious as to whether this is Microsoft's problem in their compiler or if there's a standard saying this is to be...
5
by: Dave | last post by:
I am trying to compile my C++ programs in debug mode in Visual NET 2003 and keep getting the following message fatal error LNK1104: cannot open file 'mfc70d.lib I cannot find this program anywhere...
126
by: ramyach | last post by:
Hi friends, I need to write a parallel code in 'C' on the server that is running SGI Irix 6.5. This server supports MIPS Pro C compiler. I don't have any idea of parallel C languages. I looked...
8
by: Chameleon | last post by:
I have a TGA image header struct. TGA has 18 bytes header, so the C struct too. why this return 20? sizeof(TGAHeader) I saw this in many structs. I believe compiler round up the size to 4...
4
by: Rick | last post by:
I'm told that "#pragma once" has made it into the ISO standard for either C or C++. I can't find any reference to that anywhere. If it's true, do any of you have a reference I can use? ...
5
by: rembremading | last post by:
Hi All, I want to use intels LibM math library for my c program under Linux with intel compiler 10.1. I tried to follow the steps in...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.