Re: Is there a difference between passing "" and passing Nothing to a Windows API ?
great thanks
"m.posseth" <posseth@planet .nl> wrote in message
news:%23JL0VaAM GHA.3432@tk2msf tngp13.phx.gbl. ..[color=blue]
> "" and string.empty are perfectly equivalent
>
> prove ??
>
>
> dim x as string =""
> dim y as string = string.empty
>
> string.Referenc eEquals(x,y)
>
> this will display true
>
>
> regards
>
> Michel Posseth [MCP]
>
>
> " academic" <academic@a-znet.com> schreef in bericht
> news:u7FGUTAMGH A.676@TK2MSFTNG P10.phx.gbl...[color=green]
>>
>> "m.posseth" <posseth@planet .nl> wrote in message
>> news:uIV$vt$LGH A.2416@TK2MSFTN GP15.phx.gbl...[color=darkred]
>>> it is considered good coding practice to initialize string values with a
>>> empty string value
>>>
>>> dim x as string =""
>>> or
>>> dim x as string=string.e mpty
>>>
>>>[/color]
>> Are these equivalent
>>
>> I mean, does x end up the same?
>>
>> Thanks
>>[/color]
>
>[/color]
great thanks
"m.posseth" <posseth@planet .nl> wrote in message
news:%23JL0VaAM GHA.3432@tk2msf tngp13.phx.gbl. ..[color=blue]
> "" and string.empty are perfectly equivalent
>
> prove ??
>
>
> dim x as string =""
> dim y as string = string.empty
>
> string.Referenc eEquals(x,y)
>
> this will display true
>
>
> regards
>
> Michel Posseth [MCP]
>
>
> " academic" <academic@a-znet.com> schreef in bericht
> news:u7FGUTAMGH A.676@TK2MSFTNG P10.phx.gbl...[color=green]
>>
>> "m.posseth" <posseth@planet .nl> wrote in message
>> news:uIV$vt$LGH A.2416@TK2MSFTN GP15.phx.gbl...[color=darkred]
>>> it is considered good coding practice to initialize string values with a
>>> empty string value
>>>
>>> dim x as string =""
>>> or
>>> dim x as string=string.e mpty
>>>
>>>[/color]
>> Are these equivalent
>>
>> I mean, does x end up the same?
>>
>> Thanks
>>[/color]
>
>[/color]
Comment