rksoftware

Visual Studio とか C# とかが好きです

2021-11-04から1日間の記事一覧

明確な代入分析の改善

C#

■ C# 10.0 での新機能 ・明確な代入分析の改善 (Improved definite assignment analysis) https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/proposals/csharp-10.0/improved-definite-assignment 変数に値がセットされているかの分析が機…

汎用属性

C#

■ C# 10.0 での新機能 ・汎用属性 (Generic attributes) https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/proposals/csharp-10.0/generic-attributes 属性クラスでジェネリクスが使える。 [Sample<int>] void Method() {; } class SampleAttr</int>…

強化された #line ディレクティブ

C#

■ C# 10.0 での新機能 ・強化された #line ディレクティブ (Enhanced #line directives) https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/proposals/csharp-10.0/caller-argument-expression #line ディレクティブで Razor などで正しい…

呼び出し元の引数の式

C#

■ C# 10.0 での新機能 ・呼び出し元の引数の式 (Caller argument expression) https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/proposals/csharp-10.0/caller-argument-expression 引数の部分で書かれた式を呼び出し先のメソッドで文字…

ラムダの機能強化 ラムダ属性

C#

■ C# 10.0 での新機能 ・ラムダの機能強化 ラムダ属性 (Lambda improvements) https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/proposals/csharp-10.0/lambda-improvements ラムダで属性が使える、また return 値の型も書ける。メソッド…

定数の補間文字列

C#

■ C# 10.0 での新機能 ・定数の補間文字列 (Constant interpolated strings) https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/proposals/csharp-10.0/constant_interpolated_strings const string の定義で値に文字列補間が使えるように…

補間された文字列の改善

C#

■ C# 10.0 での新機能 ・補間された文字列の改善 (ImprovedInterpolatedStrings) https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/proposals/csharp-10.0/improved-interpolated-strings ロギングフレームワークなどを想定した文字列補…