|
Suppose i am writing code in .net e.g
int i=10
then .net show me red line under the code where error occurs.we know the i have not apply semicolon at the end of syntax(int i=10;)
who handles these error while writing the source code???.
|
|
|
|
|
Well, you do! I'm not going to come over there, press the ';' key for you and then go back home again, am I?
You should never use standby on an elephant. It always crashes when you lift the ears. - Mark Wallace
C/C++ (I dont see a huge difference between them, and the 'benefits' of C++ are questionable, who needs inheritance when you have copy and paste) - fat_boy
|
|
|
|
|
if you are not able to under stand the query then pls never try to reply.
thanks for your suggestion.
|
|
|
|
|
It is your responsility to phrase the question correctly so other will understand you. If you can't do that and be civil, then please don't post here again.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Sharma Dinesh Kumar wrote: who handles these error while writing the source code???.
It is the responsibility of the developer to correct such errors.
Is this your first time programming?
Me, I'm dishonest. And a dishonest man you can always trust to be dishonest. Honestly. It's the honest ones you want to watch out for...
|
|
|
|
|
|
Sharma Dinesh Kumar wrote: who handles these error while writing the source code???
I'm going to guess that you want to know how the computer "knows" how to read C#-sourcecode and where that spellingchecker-thingy is getting it's intelligence from to recognize a syntax-error.
This assumption correct?
I are Troll
|
|
|
|
|
From whatever I could see in ILDasm, I guess VS uses Microsoft.VisualStudio.CSharp.Services.Language.dll to parse and validate the code we write.
|
|
|
|
|
Thank your for giving an answer instead of trolling, which was all that others was able to do <- oops, that was too strong a bit.
BTW I have another question. Is there a (simple?) way to implement a custom "spell-checking" as an add-in for VS? I would like to underline syntax errors in LateX documents.
Thanks --
Greetings - Jacek
|
|
|
|
|
Jacek Gajek wrote: instead of trolling, which was all that others was able to do.
All the other were valid responses. I don't know what you consider trolling. The OP was very poorly worded and did not communicate the question well at all.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
OK, sorry. I just found d@nish's answer most helpful, but I have overreacted. I apologise for my tactless remark.
Cheers/
Greetings - Jacek
|
|
|
|
|
|
harold aptroot wrote: Edit: before someone says "omg that's colouring not error checking"
Don't worry, someone is not one of these who do 'omg'.
Greetings - Jacek
|
|
|
|
|
Jacek Gajek wrote: Thank your for giving an answer instead of trolling, which was all that others was able to do.
This is because he used the information from everyone else to deduce that your question meant something very different from what you actually wrote.
|
|
|
|
|
Well not me actually, but you are right; I just need similar knowledge.
Greetings - Jacek
|
|
|
|
|
Do not spam the forums. Pick one and stick with it.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Sharma Dinesh Kumar wrote: .net show me red line
No it doesn't. Visual Studio does. Behind the scenes, there's a fairly continuous parsing/compilation process going on out of process, and it is this that raises this. It's this process that provides the smart tag functionality to allow you to add the implementation of an interface or identify that a method is missing, etc.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
|
What? Elvis does this? I know he's the king, but that's just too cool.
"Your code does not compile. All hail to the king."
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
No. He left the building... to the elves.
|
|
|
|
|
Hi
I try debug my work in VS 2008 but PC and HTC WM6 (.NetF.work 3.5 installed) understand numbers diferently. First thing, number format in my region separated with coma 0,1.
What i cant get to work:
Test1 number in the textbox cosfi stored like us format 0.9 (not coma)
<br />
A.Text = System.Convert.ToString(Math.Round(System.Convert.ToDouble(cosfi.Text), 2) * 2);<br />
A.Text in PC test 1.8
In the phone i get error FormatExeption double.parse....
Test2 number in the textbox cosfi stored 0,9
A.Text in PC test 18
In the phone 1,8
<br />
A.Text = System.Convert.ToString(Math.Round(System.Convert.ToDouble(cosfi.Text.Replace(",", ".")), 2) * 2);<br />
With this metod all the same, PC give right answer 1.8 and phone give me error.
Can anyone help me out?
|
|
|
|
|
The chances are that your PC and phone are set to different locale. Your PC is set to work with '.' as a decimal separator, and your phone with ','
You can either set the PC and the phone to the same locale, or (if you must, because it will restrict where your App works) specifcy the locale when you do the conversion. See TryParse[^] which allows you to specify which locale you want the conversion done in.
You should never use standby on an elephant. It always crashes when you lift the ears. - Mark Wallace
C/C++ (I dont see a huge difference between them, and the 'benefits' of C++ are questionable, who needs inheritance when you have copy and paste) - fat_boy
|
|
|
|
|
First: PC and phone are both in same local.
Second: Both work in same separator.
Third: Compact.framework not suport TryParse
Fourth: I dont have this problem if i write app for pc in Visual Basic (comma separator return always right answer).
|
|
|
|
|
Mees Metsast wrote: First: PC and phone are both in same local.
You said the emulator (not the PC) and the phone work differently. The way you described, these two ARE set to different locales. You provided all the proof needed to establish that.
Mees Metsast wrote: Third: Compact.framework not suport TryParse
You don't have to use TryPrase . double.Parse also takes a IFormatProvider parameter that DOES work on .NET CF.
Mees Metsast wrote: Fourth: I dont have this problem if i write app for pc in Visual Basic (comma separator return always right answer).
There are no two ways about this. The problem you are facing is because of an incorrect locale setup on your test device, probably the emulator.
|
|
|
|
|
Sorry, this is my second app for phone and only now i get how this thing work (hard headed).
I tried to find a emulator settings under the VS2008 menu but this needs to be configured when it is running like normal phone (regional settings in the emulator itself).
Thank you for pointing right direction.
|
|
|
|
|
hi ...
WE are developed a windows based desktop application in c# . Now need to give license protection for that application. we are decided to give dongle license key . but have no idea about that . How can we achieve that ..please give the solution of these...
Thankyou!!!!
|
|
|
|