.net - Problems in declaring a variable as Byte in VB.NET -
i'm trying out program found on net. why necessary put curly braces @ end of statement? gives error: "byte has no constructors".
dim data byte() = new byte(1023) {}
i can't put code either, produces error "byte cannot 1-dimensional array".
dim arr byte() = new byte()
can explain me why happening?
you need curly braces, because if don't put them, means you're trying call constructor single object -- error different reasons:
- you can't assign single object array. (this true.)
byte
doesn't have constructor. (this true in particular case.)
Comments
Post a Comment