type converting
-
For generic purpose type converting there's a static class "Convert". There you have a "ToString([param])" method
Visit my blog at http://dotnetforeveryone.blogspot.com/
-
I think the best way to do that is to use a generic list List chars = new List(); chars.Add('t'); Console.WriteLine(chars[0].ToString()); Lester http://www.lestersconyers.com
-
I think the best way to do that is to use a generic list List chars = new List(); chars.Add('t'); Console.WriteLine(chars[0].ToString()); Lester http://www.lestersconyers.com
lsconyer wrote:
the best way
The best way to fail a code review maybe!
**
xacc.ide-0.2.0.77 - now with C# 3.5 support and Navigation Bar!^
New xacc.ide release RSS feed^**
-
I think the best way to do that is to use a generic list List chars = new List(); chars.Add('t'); Console.WriteLine(chars[0].ToString()); Lester http://www.lestersconyers.com
That's a bad idea, lester. First of all, it only returns the first character as a string, not the whole character array. Secondly, adding the chars to a list does nothing to help converting the whole thing to a string.
Tech, life, family, faith: Give me a visit. I'm currently blogging about: Minnesota Bridge Collapses The apostle Paul, modernly speaking: Epistles of Paul Judah Himango
-
I think the best way to do that is to use a generic list List chars = new List(); chars.Add('t'); Console.WriteLine(chars[0].ToString()); Lester http://www.lestersconyers.com
Did you look at the earlier replies at all ? your "best way" is plain wrong, it does not address the problem, it needs at least .NET 2.0, it creates more than one object, and it is in no way better than a simple string constructor. Life is study.
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips: - make Visual display line numbers: Tools/Options/TextEditor/AllLanguages/General - show exceptions with ToString() to see all information - before you ask a question here, search CodeProject, then Google
-
Did you look at the earlier replies at all ? your "best way" is plain wrong, it does not address the problem, it needs at least .NET 2.0, it creates more than one object, and it is in no way better than a simple string constructor. Life is study.
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips: - make Visual display line numbers: Tools/Options/TextEditor/AllLanguages/General - show exceptions with ToString() to see all information - before you ask a question here, search CodeProject, then Google
My, my, my. I didn't know programmers could be so sassy. Excuse me experts. I guess I didn't understand the problem. Please forgive me.
-
My, my, my. I didn't know programmers could be so sassy. Excuse me experts. I guess I didn't understand the problem. Please forgive me.
lsconyer wrote:
Please forgive me
No problem.
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips: - make Visual display line numbers: Tools/Options/TextEditor/... - show exceptions with ToString() to see all information - before you ask a question here, search CodeProject, then Google
-
My, my, my. I didn't know programmers could be so sassy. Excuse me experts. I guess I didn't understand the problem. Please forgive me.
We don't mean to be sassy, just wanted to correct a wrong answer. No harm meant.
Tech, life, family, faith: Give me a visit. I'm currently blogging about: Minnesota Bridge Collapses The apostle Paul, modernly speaking: Epistles of Paul Judah Himango