Probably because it's not relevant; what's relevant is the version of the framework you're targetting. The IDE will support everything for the latest framework that was in use at the moment of the release of the IDE.
..and no, the IDE does not dictate the version; that's like having Notepad++ dictate the version-number of Java.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
Yes and no. Versions of the C# language are tied to a particular version of the C# compiler (i.e. csc.exe), and those come with a particular version of the .Net Framework – which typically has the same number as the language version, but not always (i.e. .Net 1.1 and .Net 3.5 provide C# 1 and C# 3, but the framework libraries were extended).
The .Net Framework is backward-compatible, so a .Net 2 application will run under 3.5, 4 or 4.5. However, the reverse isn't true: a .Net 4 assembly won't load under .Net 2.0. This is somewhat complicated because the underlying framework didn't change between 2.0 and 3.5, so I think a 3.5 assembly will load on .Net 2.0.
With each edition of .Net, Microsoft also update Visual Studio so that it can target the new platform. That means that if you want to create a project that targets version 4.0 of the .Net Framework you need VS2010, and so on. This is largely because they want you to upgrade, in that the linking process is the same and there's no reason they can't allow you to update configuration files for the old version, although there are sometimes major new features (e.g. WPF or WCF) which you wouldn't get without a new IDE.
In addition, newer IDEs support the syntax of the newer language version, without which autocomplete, syntax highlighting, auto-braces and other in-IDE features wouldn't work. This is a direct linkage between IDE and supported language.
So the short answer is: yes, you need a new enough version of Visual Studio (or whatever IDE you choose to use) to target a particular framework version. But it's not as simple as just language-to-IDE. For any .Net version, you can still code in a text editor and run the compiler on the command line.
Try BitConverter.ToSingle[^] - can't guarantee it will work, it depends on the originator floating point format. If it give ridiculous values, try swapping the byte order:
ABCD -> DCBA
Then try it again.
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
This will make the floating point equivalent of the 4 byte integer interpretation of the bytes (i.e. "08 01 00 00" will make you 264.0), not the IEEE single precision floating point number represented there.
I'm simply creating the controls from the code behind by calling the respective constructor and now i am looking to make those controls created from code behind draggable though I tried AjaxDragPanelExtender for this but the controls were not retaining their position on postback.
FirstOrDefault is your clue. If not found, it will return the default value for DateTime which is DateTime.MinValue.
if (complete_date != DateTime.MinValue)
if (complete_date != default(DateTime))
null is default for reference types such as classes and interfaces, for value types such as structs there is normally a static readonly field or property available such as MinValue or Empty, or you can use the parameterless constructor to get the default, or default(...) as above.
DateTime is a ValueKind, so comparing it with null isn't very useful (it'll always not be null).
If your LINQ query doesn't find any rows, then FirstOrDefault() will return a default instance of the requested data type (DateTime, in this case).
There's a clue in the name
If you want to know if you found any rows or not, either test the query first (e.g. Any()) before evaluating First(), or compare the returned value with the default DateTime value (DateTime.MinValue, IIRC). If you do that however, you won't be able to tell the difference between no rows, and rows where the first had the minimum datetime value.
SELECT CASE WHEN COALESCE(title2, title)='RUNTIME PARAMETER'
It is ok but I want them not to be written in the function because anyone developer can mess it up. There will be lot of queries which will get run time parameters also from functions.
I want it somewhere so that it is safe. But it should be available during run time, means if i want to replace a query the i should be able to so that without the need of building and deploying the files.
One way i was thinking is to use either resource files or config files but i cannot make mind. I don't want the performance to take a hit yet to maintain flexibility and maintainability.
Using resource files means to load read text which will incur some performance loss but is better than config files as they are not safe and easily readable.
Last Visit: 31-Dec-99 18:00 Last Update: 25-Jun-22 18:47