What is the difference between String s(Small s) and String
S(Capital S)?
Answers were Sorted based on User's Feedback
Answer / bhagyashri
Small string is used as a DataType to declare variable &
Capital String is Class.Both are derived from
System.String.To Declare Any string variable we use small
string.
Is This Answer Correct ? | 25 Yes | 1 No |
There is no difference between string and String.
string is just an alias of System.String. They both
are complied to the same code. In IL there is no difference
between the two. But as a standard followed by MSDN string
is used as datatype declaration e.g string s = "abc"
and if we are accessing some class then String should be
used. e.g String.Format("abc");
Is This Answer Correct ? | 7 Yes | 0 No |
Answer / azka106
basically string is used as datatype,.,.., whereas String is a predefined function ,.,. that usually called as String function,.,.,. and when we have to print something using String we override this String function,...and small s string is just datatype as above describe..
Is This Answer Correct ? | 1 Yes | 2 No |
How to call a function when a class implements 2 interfaces and function is present in both interfaces?
what is CLONE() method?
What is private readonly in c#?
How to make a class not inheritable other than sealed?
How can i load the text box and label at the runtime based on the existing text box and tabel
2 Answers Merrill Lynch, Patni,
What is a shared assembly?
hi, I am a begineer to c sharp. I have written a code for finding out prime numbers. Can anyone identify what are the flaws in my code. Kindly donot complex the code or present logic because i am new to c sharp and just started learning programming language.Thanks in advance. class Program { static void Main(string[] args) { int a,b=1; a = int.Parse(Console.ReadLine()); c= int.Parse(Console.ReadLine()); if (a % b == 0 && a % 2 != 0 && a % a == 0) Console.WriteLine(a); else if (a % b == 0 && a % 2 == 0) Console.WriteLine(a%2); Console.WriteLine("Number is not PRIME"); Console.ReadLine(); } } }
Where is the main method in c#?
What is a datacontract?
Explain the Different types of configuration files in .net?
What is difference between variable and property in c#?
What is a property c#?