在 Blazor (.razor) 组件中编写代码时,其格式如下:
@code {
void Abc()
{
}
}
Run Code Online (Sandbox Code Playgroud)
然后我将纠正缩进:
@code {
void Abc()
{
}
}
Run Code Online (Sandbox Code Playgroud)
但每当我插入 if 条件时,缩进就会变得混乱:
@code {
void Abc()
{
if (true)
{
}
}
}
Run Code Online (Sandbox Code Playgroud)
这就像它有一个相差一缩进的问题。我不知道是我的问题还是Visual Studio的问题。这在 .cs 文件中不是问题。
我有一个UITableViewCell,如果我将它的样式设置为除Custom之外的任何东西,它会给我以下设计时错误:
Illegal Configuration
Only the "Custom" style is supported in versions prior to Xcode 4.2
Run Code Online (Sandbox Code Playgroud)
它仍然可以编译并运行正常.
我正在使用Xcode 4.2(build 4D199),所以我不明白为什么会这样说.此外,我在网上找不到任何关于此的内容,这让我怀疑这是我的设置特有的东西.
我可以通过创建一个新的Xcode项目并在设计器上删除UITableViewCell并将其样式设置为Basic之外的其他东西来复制它.如果有人能够真正快速地看到它是否发生在他们身上,即使这可能会有所帮助,因为那时我至少知道它是否只是我的设置.
任何想法都表示赞赏.