|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
is this ok with arrayshey all,
i have the following dim statement: Dim myArray() As Boolean = {enum.value1 = True, enum.value2 = True, enum.value3 = True, enum.value4 = True, enum.value5 = True} instead of dim myArray() as boolean={true,true,true,true,true} or is there a better way for readability? thanks, rodchar Rodchanr,
> Did you use Option Strict On.> Dim myArray() As Boolean = {enum.value1 = True, enum.value2 = True, > enum.value3 = True, enum.value4 = True, enum.value5 = True} > > instead of > > dim myArray() as boolean={true,true,true,true,true} > In my idea are the however not the same and gives the above false,false,false,false,false. Therefore what do you want to do and what do you want to express for readability? Cor sorry bout that, I wasn't thinking.
Show quoteHide quote "Cor Ligthert" wrote: > Rodchanr, > > > > > Dim myArray() As Boolean = {enum.value1 = True, enum.value2 = True, > > enum.value3 = True, enum.value4 = True, enum.value5 = True} > > > > instead of > > > > dim myArray() as boolean={true,true,true,true,true} > > > Did you use Option Strict On. > > In my idea are the however not the same and gives the above > > false,false,false,false,false. > > Therefore what do you want to do and what do you want to express for > readability? > > Cor > > > "rodchar" <rodc***@discussions.microsoft.com> schrieb: Both samples are not semantically equivalent. The first line will compare > Dim myArray() As Boolean = {enum.value1 = True, enum.value2 = True, > enum.value3 = True, enum.value4 = True, enum.value5 = True} > > instead of > > dim myArray() as boolean={true,true,true,true,true} > > or is there a better way for readability? enumeration values with 'True', which doesn't necessarily lead to the value 'True' written to the array. -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/>
Need to sort ListView columns that contain dates
Accessing dlls at runtime C# to VB crossover questions hide control based on SQLS2K column level permission Need Help with Shell Update Element in ArrayList Structure Large fonts setting (120DPI) GetType and ApplicationClass About MessageQueue Problem Using JPG stills to make a "Video" file |
|||||||||||||||||||||||