I'm trying to run some code I typed in from "Pro .Net 2.0 Windows Forms
and Custom Controls in C#", and I'm getting two errors that seem like
they shouldn't be happening.
One example is:
if (mc == null) [where mc is a reference to Quartz.dll, which I
pulled in by letting VS 2008 do an interop]
It gives me something like "null is an unrecognized literal".
Next one is:
if (mc.ShowDialog() == DialogResult.OK)
it comes back and says "OK is unrecognized Enum"
Is there some namespace I need to pull in to make these work? 11 1413
Hi,
No, ar eyou sure u r creating a C# project?
--
Ignacio Machin http://www.laceupsolutions.com
Mobile & warehouse Solutions.
"doofy" <no**@notme.comwrote in message
news:47***********************@news.sonic.net...
I'm trying to run some code I typed in from "Pro .Net 2.0 Windows Forms
and Custom Controls in C#", and I'm getting two errors that seem like they
shouldn't be happening.
One example is:
if (mc == null) [where mc is a reference to Quartz.dll, which I pulled
in by letting VS 2008 do an interop]
It gives me something like "null is an unrecognized literal".
Next one is:
if (mc.ShowDialog() == DialogResult.OK)
it comes back and says "OK is unrecognized Enum"
Is there some namespace I need to pull in to make these work?
Ignacio Machin ( .NET/ C# MVP ) wrote:
Hi,
No, ar eyou sure u r creating a C# project?
I wondered about that. I'm new to both C# and VS 2008. I set the
settings for C#. It's accepting curly braces in the code where C++
would use a parenthesis.
Ignacio Machin ( .NET/ C# MVP ) wrote:
Hi,
No, ar eyou sure u r creating a C# project?
So, I've specifically set the environment to C#, and I'm getting files
that are generated with the .cpp file type. Does this happen in C# also?
doofy wrote:
So, I've specifically set the environment to C#, and I'm getting files
that are generated with the .cpp file type. Does this happen in C# also?
C# files are generally .cs, it sounds like your project is a C++ project.
Chris.
..cpp files are C++ files. C# files have a .cs file extension. When you create
the project you have to choose what language you want to use.
"doofy" wrote:
Ignacio Machin ( .NET/ C# MVP ) wrote:
Hi,
No, ar eyou sure u r creating a C# project?
So, I've specifically set the environment to C#, and I'm getting files
that are generated with the .cpp file type. Does this happen in C# also?
Adrian wrote:
.cpp files are C++ files. C# files have a .cs file extension. When you create
the project you have to choose what language you want to use.
"doofy" wrote:
>>Ignacio Machin ( .NET/ C# MVP ) wrote:
>>>Hi,
No, ar eyou sure u r creating a C# project? So, I've specifically set the environment to C#, and I'm getting files that are generated with the .cpp file type. Does this happen in C# also?
I thought I did. A few times. However, I went to my other machine and
created the project, and I've got .cs files now, and the code is working
fine. Sorry for the newbie hiccup.
Hi,
You select the language when you create the project.
Not only that, but IIRC null is also a valid keyword in C++
--
Ignacio Machin http://www.laceupsolutions.com
Mobile & warehouse Solutions.
"Adrian" <Ad****@discussions.microsoft.comwrote in message
news:8B**********************************@microsof t.com...
.cpp files are C++ files. C# files have a .cs file extension. When you
create
the project you have to choose what language you want to use.
"doofy" wrote:
>Ignacio Machin ( .NET/ C# MVP ) wrote:
Hi,
No, ar eyou sure u r creating a C# project? So, I've specifically set the environment to C#, and I'm getting files that are generated with the .cpp file type. Does this happen in C# also?
Ignacio Machin ( .NET/ C# MVP ) wrote:
Hi,
You select the language when you create the project.
Not only that, but IIRC null is also a valid keyword in C++
Evidently, when my project window was opening for C#, the cursor was way
down in the "Other Languages" area, and I didn't notice. Thus my
blunder. Now I know. Null is still a mystery in C++ then. But it's
working in CS.
Thanks for the help all. It made me start thinking outside the box.
Hi,
"doofy" <no**@notme.comwrote in message
news:47***********************@news.sonic.net...
Ignacio Machin ( .NET/ C# MVP ) wrote:
Evidently, when my project window was opening for C#, the cursor was way
down in the "Other Languages" area, and I didn't notice. Thus my blunder.
Now I know. Null is still a mystery in C++ then. But it's working in CS.
As C# and C++ are both case sensitives you have to use null , in lowercase.
Maybe that was your error all the time
--
Ignacio Machin http://www.laceupsolutions.com
Mobile & warehouse Solutions.
"Ignacio Machin ( .NET/ C# MVP )" <machin TA laceupsolutions.comwrote in
message news:ee*************@TK2MSFTNGP04.phx.gbl...
Hi,
You select the language when you create the project.
Not only that, but IIRC null is also a valid keyword in C++
No, it's not. NULL is a symbolic constant for (address) 0, while "nullptr"
is the new C++/CLI keyword which looks like it will be standardized in
C++0x.
>
--
Ignacio Machin http://www.laceupsolutions.com
Mobile & warehouse Solutions.
"Adrian" <Ad****@discussions.microsoft.comwrote in message
news:8B**********************************@microsof t.com...
>.cpp files are C++ files. C# files have a .cs file extension. When you create the project you have to choose what language you want to use.
"doofy" wrote:
>>Ignacio Machin ( .NET/ C# MVP ) wrote: Hi,
No, ar eyou sure u r creating a C# project?
So, I've specifically set the environment to C#, and I'm getting files that are generated with the .cpp file type. Does this happen in C# also?
Hi,
My bad, it's been a while since I last touched C++
--
Ignacio Machin http://www.laceupsolutions.com
Mobile & warehouse Solutions.
"Ben Voigt [C++ MVP]" <rb*@nospam.nospamwrote in message
news:uC**************@TK2MSFTNGP02.phx.gbl...
>
"Ignacio Machin ( .NET/ C# MVP )" <machin TA laceupsolutions.comwrote in
message news:ee*************@TK2MSFTNGP04.phx.gbl...
>Hi,
You select the language when you create the project.
Not only that, but IIRC null is also a valid keyword in C++
No, it's not. NULL is a symbolic constant for (address) 0, while
"nullptr" is the new C++/CLI keyword which looks like it will be
standardized in C++0x.
>> -- Ignacio Machin http://www.laceupsolutions.com Mobile & warehouse Solutions. "Adrian" <Ad****@discussions.microsoft.comwrote in message news:8B**********************************@microso ft.com...
>>.cpp files are C++ files. C# files have a .cs file extension. When you create the project you have to choose what language you want to use.
"doofy" wrote:
Ignacio Machin ( .NET/ C# MVP ) wrote: Hi,
No, ar eyou sure u r creating a C# project?
So, I've specifically set the environment to C#, and I'm getting files that are generated with the .cpp file type. Does this happen in C# also? This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Jason Curl |
last post by:
I've been reading this newsgroup for some time and now I am thoroughly
confused over what NULL means.
I've read a NULL pointer is zero (or zero typecast as a void pointer),
others say it's...
|
by: John Sidney-Woollett |
last post by:
Hi
I'm building a web app where changes to customer orders are logged in the
following table, and I worried about the time that it will take to locate
records that need further...
|
by: Tim_Mac |
last post by:
hi,
i have a master page, and i want to put an asp:literal control in the
<head><title> section. but it won't build because it says it's an
unrecognized tag prefix.
if i put the control inside...
|
by: kens |
last post by:
I've found some odd behavior in dynamically loaded user controls under
ASP.NET 2.0. Specifically, if I load a control dynamically, in the
"Page_Load" event, the code-behind for the user control is...
|
by: Dean N. Williams |
last post by:
Dear Python and Mac Community,
I have just successfully built gcc version 4.1.0 for my Mac OS X 10.4.6.
gcc -v
Using built-in specs.
Target: powerpc-apple-darwin8.6.0
Configured with:...
|
by: BluNuit |
last post by:
I have a simple c# app that calls a Java (AXIS) web service to perform some
operations. The call works fine (the java code fires and the operations are
executed), but the response is always null. ...
|
by: Luurs |
last post by:
Hi All,
I've been using a asp-label in the HTML <headsection for quite some
time in order to dynamically generate meta-keywords,-description, css
and js references.
Though the actual...
|
by: Doogie |
last post by:
Hi,
I'm writing Javascript code to parse out a query string. I want to
handle the case where a parameter value may not be sent.
So consider a parameter called "State". If the user doesn't pass...
|
by: sanjay |
last post by:
Hi,
I have a doubt about passing values to a function accepting string.
======================================
#include <iostream>
using namespace std;
int main()
{
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
| |