|
Ah right sorry , im completly new to xml inm c# the code confuses the hell out of me but i guess thats awalys the way with something new
Im not ready to write my own xml handling yet can you post an example that changes that value ? theyres going to be a lot of repition in this app so ill be able to lear how to do the resat myself
thanks
|
|
|
|
|
http://support.microsoft.com/kb/317666[^]
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
|
Looks like a good link
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
hi there,
i wanna know that how can i make a int that store number like 00 instead of 0
for instance
if i add 1 to it then it should be 01 instead of 1
but after 09 it should be 10 not 010
i hope you understand what i wanna say ;)
|
|
|
|
|
xmen_xwk wrote: i wanna know that how can i make a int that store number like 00 instead of 0
No you can not store an int like this...but while displaying you can always use string formatting to show them in whatever way you want...
Hope this helps
|
|
|
|
|
A number is a number. you're talking about a rendering detail. A number is not 'stored' in any format, you decide how it looks ( if it has leading 0s, if it's shown in hex, etc ) when you display it ( using the Format method on the string class )
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
You can only do this through formatting as a string for output.
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
Hi,
the format string in some formatting methods will do that for you.
Example:
int i=9;
Console.WriteLine(i.ToString("00"));
prints 09
|
|
|
|
|
Use the format method in the String class to show the number as you want.
Regards,
Satips.
Don't walk in front of me, I may not follow;
Don't walk behind me, I may not lead;
Walk beside me, and just be my friend. - Albert Camus
|
|
|
|
|
Gee - 5 people have already answered this, what did your answer add ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Just now i signed in CG and i answered my suggestions for that.
Regards,
Satips.
Don't walk in front of me, I may not follow;
Don't walk behind me, I may not lead;
Walk beside me, and just be my friend. - Albert Camus
|
|
|
|
|
It added a nice , which none of the others did. I think flowers with an answer is the way forward on these forums.
It also knocked up his messages posted count by 1 - I reckon he's after your number one spot!! He'll be into thrash metal soon.
"More functions should disregard input values and just return 12. It would make life easier." - comment posted on WTF
|
|
|
|
|
Yep. Wonder if Satips is listening to Ratt, Quiet Riot or Twisted Sister right now
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
damn..!!
i forgot that i asked a question at code project and not checked my mail
but thanks guy i will try to use format
|
|
|
|
|
Good luck to you with format. Any other questions, post it on CP and don't forget to check your email
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
yep, it worked as i wanted
|
|
|
|
|
Cool deal, man
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
|
|
|
|
|
FolderBrowserDialog control allows to select the folder name. But I want added feature where I can type in the folder name instead of selecting the folder. How do I achieve this?
|
|
|
|
|
Probably, you will have to write on your own.
|
|
|
|
|
Hi,
I have implemented a custom membership provider. I have a class called ProviderUtility. In this class I have a method called EncodePassword.
I want to use the EncryptPassword method, but when I type MembershipProvider. then the method does not appear. Can someone please explain how do I use this method? I did use using System.Web.Security; at the top of my class.
Regards
ma se
|
|
|
|
|
Do you mean that you've written a class derived from MembershipProvider ? In your own instance methods, you should simply call EncryptPassword , without qualifying it with the MembershipProvider name (which indicates use of a static method). Optionally, to indicate that you're calling a method in a base class, you qualify it with base . This is required if your class overrides the base class method if you want the base class method to be called rather than your own.
Otherwise, EncryptPassword is a protected instance method, so it can only be called by instance methods of MembershipProvider and instance methods of classes derived from MembershipProvider . Since you cannot call it from other locations, IntelliSense does not show it in the list of available methods. If you type the name of a class followed by a dot, IntelliSense shows you a list of all public , static fields, methods, events and properties of that class (and internal static ones if the code you're working on is a member of the same assembly).
|
|
|
|
|
hai,what is the main difference between "methods" and "get" "set" properties? In properties we can assign and return values , but the same thing is possible in methods also and even calling the properties and methods is also similar.my question is why we go for properties??
thank u
dot net !!! definetely a revolution
|
|
|
|
|
Hi,
you dont need properties, but they make things easier and more readable.
which statement do you prefer:
myForm.Width+=100;
myForm.SetWidth(myForm.GetWidth()+100);
|
|
|
|
|
- Some features of C# rely on properties: i.e. design support and heavy use of attributes
- Properties are inlined (if I'm not mistaken)
- property link a set and get "method" together.
- properties are used i.e. in xml serialization (properties are serialized by default, fields not (and methods of course, too))
- I think it makes code more readable then properties stand for the state of an object where as methods stand for actions on this state.
-^-^-^-^-^-
no risk no funk
|
|
|
|