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
foo foolios
NA
8
0
Checking last index of the array giving me a problem. VS2005 C#
Aug 5 2007 10:48 PM
[CODE]
private void CreateMaze(int h, int w)
{
int r = h * w;
Room[] rooms = new Room[r];
Random rm = new Random();
int newrm = rm.Next(0, r);
int nrmcntr = newrm;
do
{
rooms[newrm].rWall = "|";
if (newrm == rooms.Length() -1)
{
newrm = 0;
}
newrm += 1;
}
while (newrm != nrmcntr);
[/CODE]
At the line:
if (newrm == rooms.Length() -1)
I am trying to compare an integer to the last index of an array of room objects.
I get the error:
Method name expected
at that line but have no clue.
Thank you in advance for any explanations.
Reply
Answers (
3
)
C# read online text files
How Refresh excel sheet automatic by machine in c# Coding