回答編集履歴
1
見直しキャンペーン中
answer
CHANGED
@@ -1,37 +1,37 @@
|
|
1
|
-
## 値
|
2
|
-
|
3
|
-
値は、`DebuggerDisplay`を表示していると思います。
|
4
|
-
[DebuggerDisplay を使用してカスタム情報を表示する - Visual Studio (Windows) | Microsoft Docs](https://docs.microsoft.com/ja-jp/visualstudio/debugger/using-the-debuggerdisplay-attribute?view=vs-2022)
|
5
|
-
|
6
|
-
何を出すかは作った人次第ですが、基本的には(区別をつけやすいような)重要なプロパティを表示していると思います。
|
7
|
-
|
8
|
-
`Random`や`int[]`がどこに定義があるかはわかりませんが、`MouseEventArgs`や`Point`は、autoexp.dllに定義がありました。
|
9
|
-
```
|
10
|
-
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Packages\Debugger\Visualizers\Original\autoexp.cs"
|
11
|
-
"C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Packages\Debugger\Visualizers\Original\autoexp.cs"
|
12
|
-
```
|
13
|
-
[.net - Can the DebuggerDisplay attribute be applied to types one doesn't own? - Stack Overflow](https://stackoverflow.com/questions/4469001/can-the-debuggerdisplay-attribute-be-applied-to-types-one-doesnt-own)
|
14
|
-
|
15
|
-
[Review: correctness of VS visualizers · Issue #1102 · dotnet/winforms](https://github.com/dotnet/winforms/issues/1102)
|
16
|
-
|
17
|
-
かっこの意味は、オブジェクト初期化子に合わせたような感じじゃないでしょうか?(なんでカンマがないかは知りません^^;
|
18
|
-
[オブジェクト初期化子とコレクション初期化子 - C# プログラミング ガイド | Microsoft Docs](https://docs.microsoft.com/ja-jp/dotnet/csharp/programming-guide/classes-and-structs/object-and-collection-initializers)
|
19
|
-
|
20
|
-
`Random`や`int[]`のかっこは何か不自然ですが、表示すべきいいものがないときに特別対応があったりするのかもしれません(何の根拠もなし)
|
21
|
-
|
22
|
-
## 種類
|
23
|
-
|
24
|
-
種類は単に変数の型と、実際の型を出しているだけだと思います。
|
25
|
-
|
26
|
-
```
|
27
|
-
var a = new Random();
|
28
|
-
object aa = new Random();
|
29
|
-
```
|
30
|
-
とすると
|
31
|
-
```
|
32
|
-
|
33
|
-
|
34
|
-
```
|
35
|
-
となります。
|
36
|
-
|
1
|
+
## 値
|
2
|
+
|
3
|
+
値は、`DebuggerDisplay`を表示していると思います。
|
4
|
+
[DebuggerDisplay を使用してカスタム情報を表示する - Visual Studio (Windows) | Microsoft Docs](https://docs.microsoft.com/ja-jp/visualstudio/debugger/using-the-debuggerdisplay-attribute?view=vs-2022)
|
5
|
+
|
6
|
+
何を出すかは作った人次第ですが、基本的には(区別をつけやすいような)重要なプロパティを表示していると思います。
|
7
|
+
|
8
|
+
`Random`や`int[]`がどこに定義があるかはわかりませんが、`MouseEventArgs`や`Point`は、autoexp.dllに定義がありました。
|
9
|
+
```
|
10
|
+
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Packages\Debugger\Visualizers\Original\autoexp.cs"
|
11
|
+
"C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Packages\Debugger\Visualizers\Original\autoexp.cs"
|
12
|
+
```
|
13
|
+
[.net - Can the DebuggerDisplay attribute be applied to types one doesn't own? - Stack Overflow](https://stackoverflow.com/questions/4469001/can-the-debuggerdisplay-attribute-be-applied-to-types-one-doesnt-own)
|
14
|
+
|
15
|
+
[Review: correctness of VS visualizers · Issue #1102 · dotnet/winforms](https://github.com/dotnet/winforms/issues/1102)
|
16
|
+
|
17
|
+
かっこの意味は、オブジェクト初期化子に合わせたような感じじゃないでしょうか?(なんでカンマがないかは知りません^^;
|
18
|
+
[オブジェクト初期化子とコレクション初期化子 - C# プログラミング ガイド | Microsoft Docs](https://docs.microsoft.com/ja-jp/dotnet/csharp/programming-guide/classes-and-structs/object-and-collection-initializers)
|
19
|
+
|
20
|
+
`Random`や`int[]`のかっこは何か不自然ですが、表示すべきいいものがないときに特別対応があったりするのかもしれません(何の根拠もなし)
|
21
|
+
|
22
|
+
## 種類
|
23
|
+
|
24
|
+
種類は単に変数の型と、実際の型を出しているだけだと思います。
|
25
|
+
|
26
|
+
```cs
|
27
|
+
var a = new Random();
|
28
|
+
object aa = new Random();
|
29
|
+
```
|
30
|
+
とすると
|
31
|
+
```
|
32
|
+
a {System.Random} System.Random
|
33
|
+
aa {System.Random} object {System.Random}
|
34
|
+
```
|
35
|
+
となります。
|
36
|
+
|
37
37
|
なんで波かっこ`{}`なのかはわかりません(丸かっこ`()`のほうがよかったような?^^;
|