I saw this somewhere:
Dim clipRegion As New [Region](clipRect)
does this mean that it is casting the clipRect to Region type and giving its value to clipRegion?:confused:
Printable View
I saw this somewhere:
Dim clipRegion As New [Region](clipRect)
does this mean that it is casting the clipRect to Region type and giving its value to clipRegion?:confused:
Actually I think ()in the front of an object is casting in C# but this looks like VB.NET code so it is just saying that the type is Region instead of using the Region keyword.
You have to do the samething with Assembly:
VB Code:
'i forgot the imports but if you dim the following 'it'll error because it thinks that you are using 'Assembly as a keyword instead of the Type dim asm as Assembly 'this does not work 'so you have to enclose it in [] to show it what you mean 'like you do for Enums in both VB6 and .NET dim asm as [Assembly] 'this works
Region can be used to make collapsable Regions of code in the IDE so you have to [] around it to let it know you mean the Type Region instead.
:)