Advertisement
geniusvil

HW02_TASK07

Nov 11th, 2013
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. using System;
  2.  
  3. class HelloWorld
  4. {
  5. static void Main()
  6. {
  7. /*Declare two string variables and assign
  8. * them with “Hello” and “World”. Declare
  9. * an object variable and assign it with
  10. * the concatenation of the first two
  11. * variables (mind adding an interval).
  12. * Declare a third string variable and
  13. * initialize it with the value of the object
  14. * variable (you should perform type casting).
  15. */
  16.  
  17. string hello = "Hello";
  18. string world = "World";
  19. object helloWorld = hello + " " + world;
  20. Console.WriteLine(helloWorld);
  21. string newHelloWorld = (string)helloWorld;
  22. Console.WriteLine(newHelloWorld);
  23. }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement