473,804 Members | 4,269 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

compilation problem in vc2005

Hi,
I have the following code:

class AA
{
public int Width { get; set; }
}

this compiles ok on VC2008 but fails in VC2005.
What is the reason and how can I build it ok in VC2005 ?

Yoav.
Sep 23 '08 #1
1 1277
On Sep 23, 9:59*am, "Yoavo" <y...@cimatron. co.ilwrote:
I have the following code:

class AA
{
* * public int Width { get; set; }
}

this compiles ok on VC2008 but fails in VC2005.
What is the reason and how can I build it ok in VC2005 ?
That's an automatically implemented property, which is part of C# 3.0.
Visual Studio 2005 only supports C# 2.0. If you *have* to use VS2005,
you'll need to write the equivalent C# 2.0 code:

class AA
{
private int width;
public int Width
{
get { return width; }
set { width = value; }
}
}

Jon
Sep 23 '08 #2

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

Similar topics

2
1898
by: indiana | last post by:
Thanks in advance. I have a vc6 dll that is currently called by a vc6 exe and want to call it from a vc2005 dll. The vc6 exe using the following header extern "C" __declspec(dllimport) int Estimate (int Task2Do,...); Can someone please point me in the right direction for calling this function from vc2005? Also, is it possible to expose the vc6 class and use that directly?
2
1308
by: adebaene | last post by:
Hello all, I just checked that the following did compile with VC2005 b2, and I think it shouldn't: template <typename T> struct A { typedef int Foo; };
2
1494
by: ClydeL | last post by:
Compling a legacy VC6.0 program with the VC2005 compiler used mfc80 dlls. Do these get installed with the .NET runtime or do they need to be installed separately.
7
4263
by: Yuanfei | last post by:
Hi There, I just found that there is a problem in vc2005 regarding to time_t and localtime. See code snippets belows. Using this code segment, I found that when ut is 86200, the corresponding output is 1970.1.1 7:56:40, when ut is 0, the output is 1970.1.1 8:00:00, when ut is 86400, the output is 1970.1.2 8:00:00. While output will be 1970 1.2 7:56:40 in VC8. Please note that I am aware that time_t is 64bit in VC2005 and using...
1
5449
by: Arsalan Ahmad | last post by:
Hi all, I am trying to compile some source files using makefile. While compiling I am getting errors as shown below. Any idea how can I solve this problem. I believe I need to add some preprocessor directives but I dont know which one. Thanks, Arsalan
2
3674
by: kittymaguire | last post by:
When I tried to use the IAxWinHostWindow interface in a MFC project I get the following An assert in CComTypeInfoHolder::GetTI(LCID lcid) at ATLASSUME(!InlineIsEqualGUID(*m_plibid, GUID_NULL) && "Did you forget to pass the LIBID to CComModule::Init?"); If I ignore this assert then I get Unhandled exception at 0x0176cfa8 in testcontAINER.exe: 0xC0000005: Access violation reading location 0x00000000.
4
12872
by: marathoner | last post by:
I tried your advice, and replaced "ifstream" with "std::ifstream". I also replaced instances of "ofstream" with "std::ofstream". Those syntax errors were resolved. When I added "std" to the following statement: m_InFile.open(m_sFileName, ios::in | ios::binary); which became m_InFile.open(m_sFileName, std::ios::in | std::ios::binary); I get the following errors:
0
1184
by: =?GB2312?B?zPC5zw==?= | last post by:
Howdy, This problem have puzzled me for a long time. I usually use python2.5 in Windows, while VC2005 is installed. However python25.lib is compiled by VC2003. When I use disutil to build some C extensions, it complaints that there is no VC2003. Well, IMO, the format of binary files generated by VC2003 and VC2005 is compatible in most cases. What should I do to workaround this error? I mean, disable distutil complaints and use VC2005 to...
0
1605
by: Christian Heimes | last post by:
甜瓜 schrieb: It's possible but ill-advised. The free mingw32 compiler can build Python extensions just fine. I'm using it all the time to build Python 2.5 extensions for Windows. In the future Python 2.6 and 3.0 are build with my VS 2008 system and extensions can be build with the free express version, too. Christian
0
9706
marktang
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10575
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10330
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10319
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10076
tracyyun
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9144
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3816
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2990
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.