arrays - How to do typeof object[*] in C#? -


i'm new c# have searched web hour , no joy...

i need ascertain whether object non-zero index array, i.e. object[*]

i've tried:

if(v != null && v.gettype() == typeof(object[*])) 

and if(v object[*])

as overloaded methods method(object v) , method(object[*] v)

all result in compilation errors.

as can't cast object[*] object[] , test getlowerbound(0) how hell can test type?

(please don't tell me bad code/design, it's coming excel cannot change that).

try type.isarray, type.getarrayrank , type.getelementtype if necessary.

if need call getlowerbound can safely cast object system.array.


Comments

Popular posts from this blog

jasper reports - Fixed header in Excel using JasperReports -

media player - Android: mediaplayer went away with unhandled events -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -