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
Johnny Nguyen
NA
6
8.3k
the Array
Apr 18 2011 11:25 PM
When I run the code bellow in the console application I got the error "
Index was outside the bounds of the array
". Why do I get the error and how to fix it?
static void Main(string[]args)
{
string aString= "This is a string";
string [] sArray= aString.Split(' ');
Console.WriteLine(sArray[sArray.Length]);
}
I thinks,should I convert the sArray.Length to int because it still be a string form. right?
Reply
Answers (
2
)
the role of void and return keyword
data table