What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » C# Programming Help

C# Programming Help
Author: Message:
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
O.P. C# Programming Help
My friend is having trouble with an assignment and I don't know enough of C# to help her.

code:
using System;

namespace DateChecker
{
    class Class1
    {
        [STAThread]
        static void Main(string[] args)
        {
            class Introduction
            {
                static void Intro()
                {
                    Console.WriteLine("Welcome to the DateChecker Program!");
                    Console.WriteLine("***********************************");
                }
                class Input_Day
                {
                    static void ValidDay(out string InputDay)
                    {
                        InputDay = "Please enter the day of the month (DD): ";
                        int sUserDay = Int32.Parse(Console.ReadLine());
                    }
                    class Input_Month
                    {
                        static void ValidMonth(out string InputMonth)
                        {
                            InputMonth = "Please enter the month (MM): ";
                            int sUserMonth = Int32.Parse(Console.ReadLine());
                        }
                        class Input_Year
                        {
                            static void ValidYear(out string InputYear)
                            {
                                InputYear = "Please enter the year (YYYY): ";
                                int sUserYear = Int32.Parse(Console.ReadLine());
                            }
                           
                        }
                        switch(Input_Month)
                        {
                            case 0:
                            case 2:
                            case 4:
                            case 6:
                            case 7:
                            case 9:
                            case 11:
                           
                                sUserDay = case 0,2,4,6,7,9,11 <= 31;     
                                //If it has 31 days in the month
                                      break;
                            case 3:
                            case 5:
                            case 8:
                            case 10:
                                sUserDay = case 3,5,8,10 <= 30;
                                //If it has 30 days in the month
                                      break;
                            default:
                                sUserDay = default <= 28;
                                       break;
                        }

                }
            }
        }

    }
}

Here are the errors she gets

[Image: attachment.php?pid=564773]

The program is supposed to allow the user to enter day then month then year (numerically) and the program is to decide if it is a valid date taking into consideration leap years.

Any help is appreciated.

.jpg File Attachment: errors.JPG (37.97 KB)
This file has been downloaded 321 time(s).

This post was edited on 11-14-2005 at 12:33 AM by matty.
11-14-2005 12:31 AM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
C# Programming Help - by matty on 11-14-2005 at 12:31 AM
RE: C# Programming Help - by matty on 11-14-2005 at 01:54 AM
RE: C# Programming Help - by ^_^ on 11-14-2005 at 02:02 AM
RE: C# Programming Help - by matty on 11-14-2005 at 02:05 AM
RE: C# Programming Help - by brian on 11-14-2005 at 02:37 AM
RE: C# Programming Help - by matty on 11-14-2005 at 02:42 AM
RE: C# Programming Help - by brian on 11-14-2005 at 02:57 AM
RE: C# Programming Help - by matty on 11-14-2005 at 03:08 AM
RE: C# Programming Help - by brian on 11-14-2005 at 03:10 AM
RE: C# Programming Help - by matty on 11-14-2005 at 03:29 AM
RE: C# Programming Help - by ShawnZ on 11-14-2005 at 03:31 AM
RE: C# Programming Help - by matty on 11-14-2005 at 03:34 AM
RE: C# Programming Help - by ShawnZ on 11-14-2005 at 03:34 AM
RE: RE: C# Programming Help - by matty on 11-14-2005 at 04:26 AM
RE: C# Programming Help - by ShawnZ on 11-14-2005 at 04:33 AM
RE: C# Programming Help - by Weyzza on 11-14-2005 at 04:34 AM
RE: C# Programming Help - by matty on 11-14-2005 at 04:46 AM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On