gpt4 book ai didi

d - "with"关键字在 D 2.0 中有什么作用?

转载 作者:行者123 更新时间:2023-12-04 11:31:51 25 4
gpt4 key购买 nike

有一个 with D 2.0 中的关键字,但我不确定它的作用,或如何使用它。我对文档的搜索没有结果。有谁知道with有什么用关键字是? (是像 C# 的 using 语句吗?还是像 Visual Basic 的 With 子句?)

最佳答案

就在这里:With Statement

The with statement is a way to simplify repeated references to the same object.



它是这样使用的:
with (expression)
{
usage();
writef("%s, %s", access, member);
}

关于d - "with"关键字在 D 2.0 中有什么作用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5072284/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com