TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Grant McConville
NA
18
0
Char to String
Mar 13 2009 5:34 AM
Can anyone please help me with what should be a simple line of code I would like to create some columns in a datatable called 'Column A' etc, and I am using this code to try to do create the name. string ColumnName; for (int counter = 1; counter <= 26; counter++) ColumnName = "Column " + Convert.ToString((char) counter + 64); What happens is the ColumnName holds 'Column 65'. It does not seem to be seeing (char). If I change the code to the following then it works fine, but thats not how I want to do it. Any ideas on what I am doing wrong please? string ColumnName; for (int counter = 65; counter <= 90; counter++) ColumnName = "Column " + Convert.ToString((char) counter);
Reply
Answers (
3
)
copying an object from clipboard
How can I disable Default ToolTip