Show/Hide Toolbars

XSharp

Bad array declarator: To declare a managed array the rank specifier precedes the variable's identifier. To declare a fixed size buffer field, use the fixed keyword before the field type.

 

An array was declared incorrectly. In X#, unlike in C and C++, the square brackets follow the type, not the variable name. Also, realize that the syntax for a fixed size buffer differs from that of an array.

Example

 

The following example code generates XS0650.

 

 

// XS0650.prg  
 

 

Example

 

The following example shows how to use the fixed keyword when you create a fixed size buffer:

 

 

// This code must appear in an unsafe block.