Temporary variables

Top  Previous  Next

What is translated > Routines > Temporary variables

 

The function StrUpper expects an PWideChar parameter. In Delphi an array of char can be passed too. In C# a temporary PChar variable is created from from the array. After the call the result is converted byk to the character array.

 

var

  S: array[0..20] of char = 'A fUnNy StRiNg';

begin

  upper:= StrUpper(S);

 

 

->

 

  char[] S = "A fUnNy StRiNg".ToCharArray();

  PChar tmp0 = new PChar(S);

  upper = StrUpper(new PChar(tmp0));

  S = tmp0.ToCharArray();



This page belongs to the Delphi2C# Documentation

Delphi2C# home  Content