Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace StringTheException
- {
- class Program
- {
- static void Main(string[] args)
- {
- Console.Write("Please enter a number or word.");
- string msg = Console.ReadLine();
- if (msg == null || String.IsNullOrEmpty(msg) ){ //to check if string is null or empty
- Console.WriteLine("You didn't enter anything!");
- }
- else{
- Console.WriteLine("Thank you for your submission!");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement