C# Programming - Strings - Discussion

Discussion Forum : Strings - General Questions (Q.No. 7)
7.
What will be the output of the C#.NET code snippet given below?
namespace IndiabixConsoleApplication
{
    class SampleProgram
    {
        static void Main(string[ ] args)
        {
            string str= "Hello World!";
            Console.WriteLine( String.Compare(str, "Hello World?" ).GetType() );
        }
    }
}
0
1
String
Hello World?
System.Int32
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
14 comments Page 2 of 2.

Amrendra kumar said:   1 decade ago
Compare method has always return type is integer.

Joseph stalin said:   8 years ago
Anyone can explain how this logic works?

Juhi said:   1 decade ago
Can anyone explain me this.

Harshil said:   1 decade ago
I think surekha is right.


Post your comments here:

Your comments will be displayed after verification.