Type Mappings from Native COBOL to .NET COBOL Code

COBOL data items are exposed as the following .NET types, when the code is compiled with the ILSMARTLINKAGE directive:

Native COBOL C# type .NET COBOL
PIC X(n) string string
PIC S9(n) where n <= 2 sbyte binary-char
PIC 9(n) where n <= 2 byte binary-char unsigned
Tip: You can use byte (or BYTE) as a synonym for binary-char unsigned.
PIC S9(n) where 2 < n <= 4 short binary-short
PIC 9(n) where 2 < n <= 4 ushort binary-short unsigned
PIC S9(n) where 4 < n <= 9 int binary-long
PIC 9(n) where 4 < n <= 9 uint binary-long unsigned
PIC S9(n) where 9 < n <= 19 long binary-double
PIC 9(n) where 9 < n <= 19 ulong binary-double unsigned
PIC 9(n)V9(m) decimal decimal
COMP-1 float float-short
COMP-2 double float-long
PIC Z9 (and any numeric edited) string string
PIC A(n) string string
Group item string string