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
Carol
NA
1
0
How do I compare these 2 arrays?
Sep 7 2009 4:30 PM
I'm just learning C# and I need to compare these 2 arrays and display which ones do not match according to the user's input of A,B,C,D. Can someone please help me out?
Here's what I have so far.
static void Main()
{
char[] exArray = new char[20] { 'B', 'D', 'A', 'A', 'C', 'A', 'B', 'A', 'C', 'D', 'B', 'C', 'D', 'A', 'D', 'C', 'C', 'B', 'D', 'A' };
char[] usArray = new char[20];
Console.WriteLine("Please enter your answers for each exam question.");
for (int a = 0; a < 20; a++)
{
Console.Write("Question #{0}: ", (a + 1));
usArray[a] = Convert.ToChar(Console.ReadLine());
}
do I use another for loop to compare the 2 or do i use a method and call both arrays in?
Reply
Answers (
1
)
Compiling at Run
How can i format my Textbox Value from money value that bind from database to normal decimal value