请选择 进入手机版 | 继续访问电脑版

易游港

 找回密码
 注册
搜索
热搜: 城市天际线
查看: 1326|回复: 0

delphi写法与c#写法对照

[复制链接]

64

主题

3

回帖

387

积分

管理员

积分
387
发表于 2023-1-10 14:16:43 | 显示全部楼层 |阅读模式
delphi if bool
  1. b:boolean;

  2. b := (a=b);
复制代码
C# if bool

  1. bool b;

  2. b = a==b?true:false
复制代码




if写法

delphi
  1. if true then
  2. begin

  3. end;

  4. //2

  5. if true then
  6. begin

  7. end else begin

  8. end;
复制代码
C#
  1. if (true)
  2. {

  3. }
  4. //2
  5. if (true)
  6. {

  7. }
  8. else
  9. {

  10. }
复制代码


回复

使用道具 举报

*滑块验证:
高级模式
B Color Image Link Quote Code Smilies

本版积分规则

Archiver|手机版|小黑屋|易游港

GMT+8, 2025-2-7 00:51 , Processed in 0.568376 second(s), 19 queries .

Powered by Discuz! X3.5

Copyright © 2001-2025 Tencent Cloud.

快速回复 返回顶部 返回列表