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
osyris zosar
NA
289
26.9k
Getting a error while create a simple class
Dec 21 2020 3:27 AM
namespace
AccountOrganizer
{
public
class
SetName
{
string
[] MaleNames =
{
"Jack"
,
"Micheal"
,
"Mike"
,
"Jordan"
,
"James"
,
"William"
,
"David"
,
"Richard"
,
"Charles"
,
"Daniel"
,
"Kevin"
,
"Brian"
,
"George"
,
"Edward"
,
"Ronald"
,
"Jason"
,
"Jeffrey"
,
};
List<
string
> MaleNameList =
new
List<
string
>(MaleNames);
Random r =
new
Random();
int
Random = r.Next(0, MaleNameList.Count());
string
sethename = MaleNameList[Random];
}
}
I get an error on line 25 28 and 30 i dont really understand why,
am i not allowed to create a list and a random object in a class?
Reply
Answers (
5
)
Can anyone suggest me the best way to learn unit testing
Kindly give any material related bugs resolving in asp.net mvc