thegrudge

StringsAndObjects

Nov 13th, 2014
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.33 KB | None | 0 0
  1. using System;
  2. class StringsAndObjects
  3. {
  4.     static void Main()
  5.     {
  6.         string firstString = "Hello";
  7.         string secondString = "World";
  8.         object objMessage = firstString + " " + secondString;
  9.         string fullMessage = (string)objMessage;
  10.         Console.WriteLine("The message is - {0}", fullMessage);
  11.     }
  12. }
Advertisement
Add Comment
Please, Sign In to add comment