Exercise: Hello CSharp

  1. In the Solution Explorer, find the main project (Marked in Bold).
  2. Add a folder called Exercises
  3. Add a class called "HelloCSharp" (don't use the # sign, it's an invalid character in a class name)
  4. Add the run method
public void Run() 
{
} 
  1. Add a call to the System.Windows.Forms.Show method
  2. In the Views folder find the ApplicationMdi form and open it the Visual Studio’s form designer.
  3. Add a new menu called “Exercises”
  4. Add a new entry called “Hello C#”
  5. When clicking the menu, call the "HelloCSharp" class we've just created.
new Exercises.HelloCSharp().Run(); 
  1. Add comments to describe your code.
  2. Build and run.
  3. In the beginning of the file, add using directive to System.Windows.Forms namespace
  4. Add another message box, using shorter syntax, to show the following message: “Shorter is better”
  5. Build and run.
  6. Using the “mbox” snippet, add another message box to show the following message: “Snippets are cool!”
  7. Build and run.



Help us improve, Edit this page on GitHub
or email us at info@fireflymigration.com