Array of const vs. set

Top  Previous  Next

What is translated > Types > Arrays > Array parameters > Array of const vs. set

Delphi2C# decides by the expected parameter type how the set argument is translated:

 

 

type

TCharSet = set of Char;

 

procedure foo(arr : array of const);

procedure bar(set : TCharSet);

 

foo(['hello', 'world']);

bar(['hello', 'world']);

 

 ->

 

  foo(new object[]{'h', 'w'});

  bar(new TSet() << 'h' << 'w');



This page belongs to the Delphi2C# Documentation

Delphi2C# home  Content