|
Before you waste your time waiting for someone to give you the code to do this, I should point out that people aren't in the habit of giving out code here on Code Project. If you search on Google, you may find that someone has posted an implementation, but I would be very surprised if they had.
|
|
|
|
|
good afternoon, how i can looking for, because i had not lucky
|
|
|
|
|
I looked for a source sample and couldn't find any - it looks like you will have to write your code based on the description of the algorithm.
Is this a homework task that you are doing? If so, then your course should have provided the necessary details on this technique.
|
|
|
|
|
|
Did you try searching[^]? There is some course material and some implementations on the first page.
This is not a website for people to do your homework for you. If you struggle to apply what you're being taught, try talking to your teacher or other students to see if there are learning techniques you are missing.
|
|
|
|
|
This may be a real obvious question, but I am a noob to C# - bing/google is not helping me. It's time to dig into C#, so the first question is what version? I came across a C# Evolution Matrix (clicky[^]) that seems to imply the C# version is joined at the hip with the IDE version:
- VS2005: C# 2.0
- VS2008: C# 3.0
- VS2010: C# 4.0
- VS2011: C# 5.0
I guess it makes sense in a way, but I've not really thought about it or made the connection. If this is the case, then I need 2010 to do C# 4.0.
Charlie Gilley
<italic>You're going to tell me what I want to know, or I'm going to beat you to death in your own house.
"Where liberty dwells, there is my country." B. Franklin, 1783
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
|
|
|
|
|
Errm, yes and no. You could develop C#4 apps in Visual Studio 2005, but you won't get access to the features such as Intellisense, compile the application in the IDE or the ability to add references through the dialog. You'd end up with the IDE highlighting lots of things that it thought were wrong. But if you edited the .csproj file by hand, and triggered the compiler using csc.exe, then you could write the application in completely "the wrong" version of Visual Studio.
|
|
|
|
|
Pete - thanks. It appears that the connection is so obvious its invisible. 2010 here I come.
Charlie Gilley
<italic>You're going to tell me what I want to know, or I'm going to beat you to death in your own house.
"Where liberty dwells, there is my country." B. Franklin, 1783
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
|
|
|
|
|
That Reply should be hanging at Microsoft web site.
Tell now they didn't write a decent compare page between Visual Studio Versions.
modified 1-Oct-12 14:23pm.
|
|
|
|
|
What Bob said.
Yes, the comparison is there, but I had my doubts...
Charlie Gilley
<italic>You're going to tell me what I want to know, or I'm going to beat you to death in your own house.
"Where liberty dwells, there is my country." B. Franklin, 1783
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
|
|
|
|
|
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.
|
|
|
|
|
Thanks for the details.
Charlie Gilley
<italic>You're going to tell me what I want to know, or I'm going to beat you to death in your own house.
"Where liberty dwells, there is my country." B. Franklin, 1783
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
|
|
|
|
|
You really do not need to use the IDE to develope C#. You can use any editor, and then use MSBuild to create the application. The others have basically covered the dependencies between C# and the IDE
|
|
|
|
|
|
Hi,
I need to convert 4 bytes in to a float or double in C#.
The 4 bytes come from the comm port and are read in to a byte array, how can I convert back to a float?
“If I had asked people what they wanted, they would have said faster horses.”
― Henry Ford
|
|
|
|
|
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
|
|
|
|
|
|
Thanks for the replies. I will give it a try later today.
“If I had asked people what they wanted, they would have said faster horses.”
― Henry Ford
|
|
|
|
|
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.
|
|
|
|
|
What shall I do in order to make the controls draggable, created from the code behind. Any help will be appreciable.
|
|
|
|
|
|
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.
I'm doing all this stuff on the web form.
|
|
|
|
|
I'm doing all this stuff on the web form.
|
|
|
|
|
Then perhaps the ASP.NET forum would be the ideal place to ask this. The experts there would probably be able to clear this up in a flash.
|
|
|
|