Advertisement
bacco

Strings and Objects

May 22nd, 2018
153
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.  
  3. namespace StringsandObjects
  4. {
  5.     class MainClass
  6.     {
  7.         public static void Main(string[] args)
  8.         {
  9.             string w1 = "Hello";
  10.             string w2 = "World";
  11.             object obj = w1 + " " + w2;
  12.             string str = (string)obj;
  13.             Console.WriteLine(str);
  14.         }
  15.     }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement