小编Don*_*noh的帖子

在“let”内声明“局部”变量意味着什么?

据我了解,let定义了一个引用,可以将其视为别名,因此例如let x = y * y * y不计算y * y * y但出现的x将被替换y * y * y。局部变量与其他语言的局部变量类似。

https://www.cairo-lang.org/docs/hello_cairo/dict.html中所示,写是什么意思let (local dict_start : DictAccess*) = alloc()?每个 的实例local dict_start : DictAccess*都会被替换为alloc()? 为什么不只是local (dict_start : DictAccess*) = alloc()let (dict_start : DictAccess*) = alloc()

cairo-lang starknet

6
推荐指数
1
解决办法
226
查看次数

在foreach中使用lambda函数而不是控件

我想翻译一下:

foreach(Control c in Controls)
{
    if(c is TextBox)
    {
        // ...
    }
}
Run Code Online (Sandbox Code Playgroud)

成:

foreach(Control c => (c is TextBox) in Controls)
{
    // ...
}
Run Code Online (Sandbox Code Playgroud)

如何使用lambda函数专门完成?

.net c# linq lambda winforms

0
推荐指数
1
解决办法
247
查看次数

标签 统计

.net ×1

c# ×1

cairo-lang ×1

lambda ×1

linq ×1

starknet ×1

winforms ×1