⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 testgenerictypenullable.out

📁 格式化源码的最新板
💻 OUT
字号:
program TestGenericTypeNullable;

{
Test code from Trident for generics
}

{$APPTYPE CONSOLE}

uses
  SysUtils;

type
  // System.Nullable est une structure
  // public struct Nullable<T> where T : struct
  TTestNullable<T:record> = class
    procedure Inverser(Arg: System.Nullable<T>; Valeur: System.Nullable<T>);
  end;

  MonRecord<T> = record
    Data: T;
  end;

  MonRecordInt = record
    Data: integer;
    constructor Create(Value: integer);
      class operator Implicit(a: integer): MonRecordInt;
  end;

  Couleurs = (Noir, Rouge, Vert);

  constructor MonRecordInt.Create(Value: integer);
  begin
    Data := Value;
  end;

  class operator MonRecordInt.Implicit(a: integer): MonRecordInt;
  begin
    Result.Data := a;
  end;

  //Avec Procedure TTestNullable<T>.Tester(Arg:System.Nullable<T>; Valeur:T); on ne peut assigner Null 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -