Unable to identify C # syntax for translating to VB.NET

I am translating example code line by line from C # to VB.NET.

The lines that confuse me look like this:

[Kernel(CustomFallbackMethod = "AddCpu")] 

I see in the code that these lines appear immediately before the method declaration:

private static void

Which line appears before the method declaration? Or is it a continuation of the latter? Hope this is obvious to the native C Sharper.

+3
source share
1 answer

This is Attribute . This is a way to mark up code that you can use at runtime or compile time.

I would use Google VB.NET and Attributes. You can read some excerpts here on O'Reilly.

Your example will be converted to:

       <Kernel(CustomFallbackMethod:="AddCpu")>

_, .

+4

All Articles