Quantcast
Viewing all articles
Browse latest Browse all 27046

VS 2010 New keyword ambiguity

I thought the New keyword can only be used with classes, but in the following, size is a structure:

me.minimumsize = New Size (400, 300 + systemInformation.captionheight)

So my question is: In how many more ways than with classes can one use the New keyword. However, this question brings me to yet another issue:

Dim myStr As New String()

which generates this error "overload resolution failed because no accessible New accepts this number of arguments". And to think that this line of code is completely legal just throws the New keyword ambiguity even deeper. Please help!

Viewing all articles
Browse latest Browse all 27046

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>