Created
October 23, 2017 04:10
-
-
Save atiq-cs/a4c32df3fe0de76bc08295ce5ad461f3 to your computer and use it in GitHub Desktop.
a test from wiziq.com - secocnd question
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* Question 2 of a C# Test | |
| http://www.wiziq.com/online-tests/14096-csharp-your-skills-1 | |
| ref Convert.ToString: | |
| https://msdn.microsoft.com/en-us/library/astxcyeh(v=vs.110).aspx | |
| Quote: | |
| Return Value | |
| Type: System.String | |
| The string representation of value, or String.Empty if value is an object | |
| whose value is null. If value is null, the method returns null. | |
| Object.ToString() : System.NullReferenceException | |
| */ | |
| using System; | |
| using System.Collections.Generic; | |
| class Solution { | |
| static void Main(string[] args) { | |
| object obj = null; | |
| string strobj = obj.ToString(); | |
| string objstr = Convert.ToString(obj); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment