小编rzi*_*ppo的帖子

ETL 文件合并失败 (0x80070070)(标志:0x0000011f)

尝试在具有 2018 年 4 月更新的 W10 机器上的 VS 2017 中分析我的命令行应用程序,VS 无法创建报告。

用户界面说Microsoft Visual Studio was unable to create a diagnostics report. Check Output window for errors

输出窗口说

Profiling of 'Program' started.
Program has exited.
Profiling of 'Program' stopped.
Diagnostics session stopped with errors.

Merging of ETL files has failed (0x80070070) (Flags: 0x0000011f).
Run Code Online (Sandbox Code Playgroud)

windows profiling visual-studio-2017

8
推荐指数
1
解决办法
3119
查看次数

如何概括属性模式

我有一些类具有多个属性,这些属性具有明确定义的名称和功能,但具有相同的实现.例如:

class Stats
{
    private int attack;
    public int Attack
    {
        get =>
            HasBuff ? attack + 1 : attack;
        set
        {
            if (value < 1 || value > 10)
                throw new ArgumentOutOfRangeException("Invalid value");
            attack = value;
        }
    }

    public int Defense {...}
    public int Speed {...}
}
Run Code Online (Sandbox Code Playgroud)

在哪里DefenseSpeed将要实施就像Attack.如何概括此结构以避免冗余并使更改更容易?

c#

3
推荐指数
1
解决办法
106
查看次数

标签 统计

c# ×1

profiling ×1

visual-studio-2017 ×1

windows ×1