sir/madam
this is saikiran, i am learning c#lang .i come across a doubt that can we perform any operations between the value type and reference type variables?
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
VulpesPosted Sep 30, 2013, 5:14 AM
However, what's actually happening here is that string concatenation operator is defined between either 2 strings or between a string and an object. In the latter case, the ToString() method is applied to the object and then that is concatenated with the string.
So, in the example, the following is (in effect) taking place:
object obj = 5;
string s = "Hello" + obj.ToString();
Console.WriteLine(s); // Hello5
VulpesPosted Sep 30, 2013, 6:32 AM
Can you either try to compress and upload it again or simply post the code.
saikiranPosted Sep 30, 2013, 6:27 AM
Jaganathan BantheswaranPosted Sep 30, 2013, 5:14 AM