RE: int to string
- From: Javaman59 <Javaman59@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 30 Aug 2005 21:53:02 -0700
> s = "Hello" + i;
The + operator returns a string.
> s = i;
You cannot (in general) assign an object of one type to an object of another
type.
Despite the visual simularity of the two cases, there is really no
comparision, and hence no contradiction.
"John Salerno" wrote:
> Given this:
>
> string s;
> int i = 0;
>
> why does this work:
>
> s = "Hello" + i;
>
> but this doesn't:
>
> s = i;
>
> Thanks.
>
.
- References:
- int to string
- From: John Salerno
- int to string
- Prev by Date: Re: Import data to db with c#
- Next by Date: Re: Abusing C#
- Previous by thread: RE: int to string
- Next by thread: OpenFileDialog
- Index(es):
Relevant Pages
|