MethodImpl Decoration

  • Thread starter Thread starter NachoShaw
  • Start date Start date
N

NachoShaw

Guest
Hey

Getting some errors with this...

When i add it like this

<MethodImpl(MethodImplOptions.NoOptimization Or MethodImplOptions.NoInlining)>_

i get an error on the underscore. This is because there needs to a space between the last character as shown here

Severity Code Description Project File Line Suppression State
Error BC30999 Line continuation character '_' must be preceded by at least one white space and must be the last character on the line. Plus C:\Users\Nigel Shaw\source\repos\Inventor Apps\Plus\Plus\FrmPlus.vb 25 Active


When i add the space, i get this error message

Severity Code Description Project File Line Suppression State
Error BC32035 Attribute specifier is not a complete statement. Use a line continuation to apply the attribute to the following statement. Plus C:\Users\Nigel Shaw\source\repos\Inventor Apps\Plus\Plus\FrmPlus.vb 25 Active


so what gives? seems whatever i do its wrong.. Im using vb.Net in Winforms and i cant find an example of how to do it right. I have imported System.Runtime.CompilerServices


Can someone guide down the right path please?


Thanks :)





Nacho is the derivative of Nigel - True fact! I am self taught in VB.Net. 50% of the time, I am right 100% of the time!

Continue reading...
 
Back
Top