Ok, today I decided to open vs 2008 and start to see what's the
changes. What's the best way to try do do something? So I decided to
read a stupid xml file with LinQ ... but ... strange thing despite the
2008 is the only version avalaible on my system ... framework 3.5 is
installed when I start to use var for variable inferering ... vs start
to mark it in red ... continuing ... from x ... red again.
Definitely there is something that doesn't work? But what?
On first try I opened an old test project, not followed the automatic
conversion, but added manually the core files required, so I though to
something missing.
But the same happen with a new project too.
What could be the error?
Thanks to all.
Andrea 15 1419
Andrew <an************ ***@gmail.comwr ote:
Ok, today I decided to open vs 2008 and start to see what's the
changes. What's the best way to try do do something? So I decided to
read a stupid xml file with LinQ ... but ... strange thing despite the
2008 is the only version avalaible on my system ... framework 3.5 is
installed when I start to use var for variable inferering ... vs start
to mark it in red ... continuing ... from x ... red again.
Are you trying to use it for an instance variable, perhaps? Implicit
typing for variables is only available for local variables.
Could you post a short but complete program which demonstrates the
problem?
See http://www.pobox.com/~skeet/csharp/complete.html for details of
what I mean by that.
--
Jon Skeet - <sk***@pobox.co m> http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
World class .NET training in the UK: http://iterativetraining.co.uk
Could you check that u have declared "using System.LINQ" ?
btw, maybe in the project properties u have .NET 2.0 target settings, that's
why u have no LINQ support
VS 2008 provides multiverstion support, and when u create new solution u can
select the target version in the top righ size of the "new project" dialog box
--
WBR, Michael Nemtsev [.NET/C# MVP].
Blog: http://spaces.live.com/laflour
"Andrew" wrote:
Ok, today I decided to open vs 2008 and start to see what's the
changes. What's the best way to try do do something? So I decided to
read a stupid xml file with LinQ ... but ... strange thing despite the
2008 is the only version avalaible on my system ... framework 3.5 is
installed when I start to use var for variable inferering ... vs start
to mark it in red ... continuing ... from x ... red again.
Definitely there is something that doesn't work? But what?
On first try I opened an old test project, not followed the automatic
conversion, but added manually the core files required, so I though to
something missing.
But the same happen with a new project too.
What could be the error?
Thanks to all.
Andrea
Well
I suppose that it won't solve anything a short complete program ...
because
I'm not able to write it at all.
I mean ... also a cut and paste of some web sample will mark in red
the new
keywords ... so I exclude my mystakes.
A strange thing that I'm also noticing is that in the Application Pool
of IIS the framework listed is only the 2.0
Are 3.0 and 3.5 considered just an extension for the IIS?
I forget to say, a part of all, that I'm running on Vista.
Could you check that u have declared "using System.LINQ" ?
I have it, and reshaper say me that I can remove because it's unused.
btw, maybe in the project properties u have .NET 2.0 target settings, that's
why u have no LINQ support
The target settings is set up on 3.5. Setting I was referering was
those one present in IIS, not in VS.
Can the problem is that I'm running on Professional Version? I noticed
this now. I just started the download of the developer edition, but I
suppose that I won't be able to run it until tomorrow morning. It's a
4gb download file.
Also lambda expression aren't recognized. There is defintely something
wrong in this installation. But it's a fresh one, made appositely for
the VS 2008 installation. Damn.
Andrew <an************ ***@gmail.comwr ote:
I suppose that it won't solve anything a short complete program ...
because I'm not able to write it at all.
If you show a short but complete program that you expect to compile,
that will tell us whether what you expect to compile and what *should*
compile are the same thing or not.
For instance, try this:
using System;
class Test
{
static void Main()
{
var x = 10;
Console.WriteLi ne (x);
}
}
Does that work, in a new console app? If not, what error message do you
get?
I mean ... also a cut and paste of some web sample will mark in red
the new keywords ... so I exclude my mystakes.
Well, some web samples have mistakes too.
A strange thing that I'm also noticing is that in the Application Pool
of IIS the framework listed is only the 2.0
Are 3.0 and 3.5 considered just an extension for the IIS?
I believe so.
--
Jon Skeet - <sk***@pobox.co m> http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
World class .NET training in the UK: http://iterativetraining.co.uk
Framework 3.0 and 3.5 build on and still use Framwork 2.0 for IIS - so yes
you should only see 2.0 listed.
-- Peter
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
MetaFinder: http://www.blogmetafinder.com
"Andrew" wrote:
Well
I suppose that it won't solve anything a short complete program ...
because
I'm not able to write it at all.
I mean ... also a cut and paste of some web sample will mark in red
the new
keywords ... so I exclude my mystakes.
A strange thing that I'm also noticing is that in the Application Pool
of IIS the framework listed is only the 2.0
Are 3.0 and 3.5 considered just an extension for the IIS?
I forget to say, a part of all, that I'm running on Vista.
Andrew wrote:
>Could you check that u have declared "using System.LINQ" ?
I have it, and reshaper say me that I can remove because it's unused.
>btw, maybe in the project properties u have .NET 2.0 target settings, that's why u have no LINQ support
The target settings is set up on 3.5. Setting I was referering was
those one present in IIS, not in VS.
Can the problem is that I'm running on Professional Version? I noticed
this now. I just started the download of the developer edition, but I
suppose that I won't be able to run it until tomorrow morning. It's a
4gb download file.
Last time I looked, Resharper didn't support C#3. They recently released
a new version though - not sure if it now supports C#3.
Alun Harford
[using System.LINQ] I have it, and reshaper say me that I can remove because it's unused.
For info, "var", lambda, etc - don't depend on this namespace - and
work even in 2.0 targets (they are compiler features, not runtime
features [lambdas as delegates, at least])
Can the problem is that I'm running on Professional Version?
Nope; should work the same on express, pro, team, etc...
Marc This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: David Van D |
last post by:
Hi there,
A few weeks until I begin my journey towards a degree in Computer
Science at Canterbury University in New Zealand,
Anyway the course tutors are going to be teaching us JAVA wth bluej and
I was wondering if anyone here would be able to give me some tips for
young players such as myself, for learning the language.
Is this the best Newsgroup for support with JAVA?
|
by: =?Utf-8?B?UnV0Z2VyIEZyYW50emVu?= |
last post by:
Hi there,
I'm busy trying to get the .net 3 runtime components installed on a fresh
instal of windows server 2008 beta 3. I've installed the .net 3 framework by
installing the application server role (default settings), but still when i
want to install the expression encoder it keeps on asking for the runtime
components, when i try to install the .net 3 redistributable package it fails
and tells me to use the role management tool, but...
|
by: Arek |
last post by:
Hi,
I'm going to buy Visual Studio Standard Edition. I've found product
feature comparison for VS 2005 version (http://msdn2.microsoft.com/en-
us/vstudio/aa700921.aspx). I'm looking for something similar for VS
2008. Is there any? I've installed Orcas Beta 2 Standard and I've
found that there is no option for mobile project creation and there is
MSDN in the same version as in Express Edition.
Can someone give me some information or web...
|
by: Terry Olsen |
last post by:
Trying to create a web site in VWD 2008 Express, i've run into a really
annoying bug/feature.
I'm creating a page that has 4 panels with a datagrid and some links inside
each panel. Only one panel is visible at a time selectable by links at the
top of the page. Several times while building the page, it moves my
components around. I don't notice anything wrong until I try to debug the
page. The page comes up wrong in IE, so I go back into...
|
by: Claudio M. E. Bastos Iorio |
last post by:
Hi, anyone using VS2008 (final) on windows Vista?
I have a problem. The ASP.NET web site administration tool on any site
created by VS2008, running on Vista, is not working as it should. I
can configure users, roles, but when I try the option 'Select a single
provider for all site management data' AspNetSqlProvider test, I
receive the message:
'Could not establish a connection to the database.
If you have not yet created the SQL Server...
| |
by: =?Utf-8?B?c2VrMDkxMA==?= |
last post by:
How do I deploy a project created with VB Express 2008? I thought there was
some type of deployment project template I had to use, but there are no
templates with the program and when I click on "Online Templates", nothing
happens.
Am I doing something wrong.
I used the "publish" feature, but all of my external audio files weren't
included and installed
|
by: Dave U. Random |
last post by:
http://snipr.com/PracticalDjango
|
by: =?Utf-8?B?ZnNhbnRvcw==?= |
last post by:
Hello guys! I have a question for you. Let me quicly explain the situation.
I used to be an MS-DOS programmer 15 years ago, using C as a language. I've
been away from daily programming since then and I've not done much with
Windows and .NET development. I've done Access programming and some other
vbscript based development.
I'm back to coding and I will be working with Visual Studio 2008 Pro using
C#. I am willing to work with latest...
|
by: Luka Djigas |
last post by:
Hello everyone,
please, I need your help. I'm new to python, so I don't know if this
will seem like a stupid question to some of you ...
I have a need to write to a file (or just print on screen, that part
doesn't matter at this point) a list of dates, starting today. For
example:
02.09.2008. tue
03.09.2008. wed
et cetera
|
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...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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...
|
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,...
|
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...
|
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 then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
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...
| |