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

Question on Environment.Version


I am using VS2008 and made sure I am using Framwork 3.5 using instructions I
just received in this group. I read somewhere that you can get the version
you are using with the following code:

Console.WriteLine(".Net Framework Version
{0}",Environment.Version.ToString());

I did that and I get version 2!! I have 3.5 installed. Should I ignore this?
I have already set the framework to 3.5 in the properties of the project.

Thanks,

-Jalil
Nov 12 '08 #1
2 2376
Jalil,

The Version property on the Environment class is correct. It returns
the version of the CLR (according to the documentation) NOT the framework.
The CLR for .NET 3.0 and .NET 3.5 is the same CLR from .NET 2.0.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Jalil" <Ja***@discussions.microsoft.comwrote in message
news:83**********************************@microsof t.com...
>
I am using VS2008 and made sure I am using Framwork 3.5 using instructions
I
just received in this group. I read somewhere that you can get the version
you are using with the following code:

Console.WriteLine(".Net Framework Version
{0}",Environment.Version.ToString());

I did that and I get version 2!! I have 3.5 installed. Should I ignore
this?
I have already set the framework to 3.5 in the properties of the project.

Thanks,

-Jalil

Nov 12 '08 #2
Lee
This does not give the correct version on my box. Try using an
element from the 3.5 framework that is not in 2.0

var is a simple way to tell.

using System.Linq

It that compiles then you are using 3.5

L. Lee Saunders
http://oldschooldotnet.blogspot.com
Nov 12 '08 #3

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

Similar topics

2
by: Durham Writer | last post by:
Hi all, I am trying to learn c++ for the first time, having used 'c' in the past. It was a long time ago and I'm getting back into programming. I was wondering if I could get some help...
10
by: Beach Potato | last post by:
Dear Y'all: I'm about to start porting a big old project written in anscient version of Delphi to something more stable, robust, supportable and maybe even portable. Since I haven't seriously...
11
by: Mark Yudkin | last post by:
The documentation is unclear (at least to me) on the permissibility of accessing DB2 (8.1.5) concurrently on and from Windows 2000 / XP / 2003, with separate transactions scope, from separate...
12
by: Mike | last post by:
I found this question before I asked mine: ----<previous question>---- We are clearly going about this the wrong way so before we get too far I would like some advice. We have all common...
10
by: Rider | last post by:
Hi, simple(?) question about asp.net configuration.. I've installed ASP.NET 2.0 QuickStart Sample successfully. But, When I'm first start application the follow message shown. ========= Server...
4
by: Richard Levasseur | last post by:
(Forewarning, most of these problems and solutions come from being the only developer in a 1 server department with no budget, few resources, unresponsive IT, and non-technical managers, so thats...
8
by: James | last post by:
Say I have a project that I have hosted locally. I have a separate machine which is our production environment. To do our deploys, we've been copying/pasting the folder from our local machines...
34
by: =?Utf-8?B?U3RldmUgQnVnZGVu?= | last post by:
Hi, I recently had an interview where I was asked a number of questions on C#. Unfortunately I didn't get the answers from the test and find that one of them is still niggling me. It was...
35
by: rebeccatre | last post by:
hi can Variant archiving setTimout('.. capability be done without using it? :-)
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?
1
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...
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...
0
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,...
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...
0
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...
0
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,...

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.