473,387 Members | 1,420 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,387 software developers and data experts.

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 1262
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
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...
2
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
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
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...
1
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...
2
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)...
4
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...
0
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...
0
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...
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: 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
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
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:
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...
0
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...

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.