gpt4 book ai didi

c# - C# 中的不同转换类型

转载 作者:行者123 更新时间:2023-11-30 19:08:01 25 4
gpt4 key购买 nike

<分区>

Possible Duplicates:
Casting: (NewType) vs. Object as NewType
Why is the C# “as” operator so popular?

嘿,

我知道这可能是个愚蠢的问题,但我今天突然想到了这个问题。

做和做有什么区别

String text = (String) variable;

String text = variable as String;

?

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