Solved

Setting up a C# .Net program

Posted on 2013-11-25
6
329 Views
Last Modified: 2013-11-25
I am starting my first C# .Net program.

How do I setup the settings so that the program will run in .Net 4.0 frameworks and beyond 4.5 etc.
0
Comment
Question by:Idarac
  • 3
  • 2
6 Comments
 
LVL 44

Expert Comment

by:AndyAinscow
Comment Utility
When you create a new project at the top of the form is a combo box - in that is the target framework (eg. .Net Framework 4).

If you have an existing project then in the solution view right click the project and choose properties from the menu.  In the tab view select Application and there is target framework in a combobox eg. .Net Framework 4
0
 
LVL 1

Author Comment

by:Idarac
Comment Utility
So if I setup for .Net version 4.0 will it still work with 4.5?
0
 
LVL 15

Expert Comment

by:unknown_routine
Comment Utility
Yes. It does work "if" you do not use 4.5 Functions and features in your code.

An example is SortVersion class which belongs to 4.5 only.

If you set up for .Net 4.0 and use SortVersion class in your code you get compile error.
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 1

Author Comment

by:Idarac
Comment Utility
So if I set 4.0 I can only stuff related to 4.0 and can I assume backward compatible correct?
0
 
LVL 44

Accepted Solution

by:
AndyAinscow earned 500 total points
Comment Utility
There is backwards  compatability, so setting it to version 4 will run on 4.5 and later versions.  If you do not actually use anything specific to version 4 you could even set the version to a lower value eg. 3.
What you can not do is set the version for 4 and code something that requires version 4.5 - the compiler will not accept that.
0
 
LVL 1

Author Closing Comment

by:Idarac
Comment Utility
Thank you
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Duplicate a row 2 29
.net VBA word safemode 1 23
.net Multiple Row Form Fields Data Entry 4 16
bulid json format 3 16
We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now