Click here to Skip to main content
15,904,653 members
Home / Discussions / C#
   

C#

 
QuestionPersonlisation and Shared View Pin
Adeel Shahid23-Oct-08 3:02
Adeel Shahid23-Oct-08 3:02 
NewsC#/CLR-based Stored Procedures in SQL Server 2005 (in the SQL Forum) Pin
James R. Twine23-Oct-08 2:36
James R. Twine23-Oct-08 2:36 
QuestionHow to get SelectedValue from Text ,,, Combobox ? Pin
kindman_nb23-Oct-08 2:31
kindman_nb23-Oct-08 2:31 
QuestionConvert it to Windows Service Pin
Vimalsoft(Pty) Ltd23-Oct-08 2:21
professionalVimalsoft(Pty) Ltd23-Oct-08 2:21 
AnswerRe: Convert it to Windows Service Pin
Simon P Stevens23-Oct-08 2:39
Simon P Stevens23-Oct-08 2:39 
AnswerRe: Convert it to Windows Service Pin
Mark Salsbery23-Oct-08 4:36
Mark Salsbery23-Oct-08 4:36 
Question"inhereting" a struct? Pin
Vodstok23-Oct-08 2:16
Vodstok23-Oct-08 2:16 
AnswerRe: "inhereting" a struct? [modified] Pin
DaveyM6923-Oct-08 2:22
professionalDaveyM6923-Oct-08 2:22 
GeneralRe: "inhereting" a struct? Pin
Vodstok23-Oct-08 3:29
Vodstok23-Oct-08 3:29 
GeneralRe: "inhereting" a struct? Pin
DaveyM6923-Oct-08 4:04
professionalDaveyM6923-Oct-08 4:04 
AnswerRe: "inhereting" a struct? Pin
Guffa23-Oct-08 2:30
Guffa23-Oct-08 2:30 
AnswerRe: "inhereting" a struct? Pin
#realJSOP23-Oct-08 4:32
professional#realJSOP23-Oct-08 4:32 
GeneralRe: "inhereting" a struct? Pin
Vodstok23-Oct-08 4:43
Vodstok23-Oct-08 4:43 
QuestionRichTextBox RightClick [modified] Pin
V.23-Oct-08 2:10
professionalV.23-Oct-08 2:10 
AnswerRe: RichTextBox RightClick Pin
JoeSharp23-Oct-08 4:22
JoeSharp23-Oct-08 4:22 
QuestionUnbound RadioButtonList Selected Item Problem Pin
amit201123-Oct-08 1:59
amit201123-Oct-08 1:59 
QuestionHelp me in exception handaling Pin
Shantonu23-Oct-08 1:38
Shantonu23-Oct-08 1:38 
QuestionRe: Help me in exception handaling Pin
Eddy Vluggen23-Oct-08 2:02
professionalEddy Vluggen23-Oct-08 2:02 
AnswerRe: Help me in exception handaling Pin
josephbhaskar23-Oct-08 3:39
josephbhaskar23-Oct-08 3:39 
Questionsoundx coding Pin
Preeti197923-Oct-08 1:36
Preeti197923-Oct-08 1:36 
AnswerRe: soundx coding Pin
Eddy Vluggen23-Oct-08 1:42
professionalEddy Vluggen23-Oct-08 1:42 
QuestionWhy if i dont convert a integer to string the output will be coming? Pin
Samiullah23-Oct-08 0:43
Samiullah23-Oct-08 0:43 
AnswerRe: Why if i dont convert a integer to string the output will be coming? Pin
Simon P Stevens23-Oct-08 0:54
Simon P Stevens23-Oct-08 0:54 
It still works because, the '+' operator has been overloaded to take various different combinations of types. In this case, the + operator is taking a string an an integer so is calling its overload for 2 objects: String.Concat(Object, Object)

The integer gets boxed as an object.

The Concat() method obviously then calls ToString() on the objects, concatenates the strings and returns the result. Which is then assigned to the 'message' variable.

You can confirm this by using ILDasm to look at the compiled IL.

(Because there is boxing occurring, this is not as efficient as calling ToString() on the integer yourself, although for most cases it won't actually make any difference)

Simon

GeneralRe: Why if i dont convert a integer to string the output will be coming? Pin
Samiullah23-Oct-08 1:56
Samiullah23-Oct-08 1:56 
GeneralRe: Why if i dont convert a integer to string the output will be coming? Pin
Guffa23-Oct-08 2:33
Guffa23-Oct-08 2:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.