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
Stephen Golden
NA
3
0
Two Dimensional Array Element Limit?
Dec 19 2007 4:25 PM
I'm trying to load a 2 dimensional array with the first dimension containing the characters 1-12 and the second the characters 1-31.
string[,] holiDays = new string[,] {{ "1","2","3","4","5","6","7","8",
"9","10","11","12" },{ "1","2","3","4","5","6","7","8","9","10",
"11","12","13","14","15","16","17","18","19","20","21","22",
"23","24","25","26","27","28","29","30","31" }};
I get the folowing error:
Invalid rank specifier: expected ',' or ']' (CS0178)
If I trim each of the array dimension values to seven, the error goes away. As soon as I add the eighth value in either dimension, the error returns.
For example, this gets no error:
string[,] holiDay2 = new string[,] {{ "1","2","3","4","5","6","7"},
{ "1","2","3","4","5","6","7"}};
These get the error:
string[,] holiDay2 = new string[,] {{ "1","2","3","4","5","6","7","8"},
{ "1","2","3","4","5","6","7"}};
string[,] holiDay2 = new string[,] {{ "1","2","3","4","5","6","7"},
{ "1","2","3","4","5","6","7","8"}};
Any ideas on this?
Reply
Answers (
2
)
About SDI Forms
Comparing two Chars?