Skip to content

Commit 93dac03

Browse files
WilliamAntonRohmmairaw
authored andcommitted
updating for Try .NET (#3690)
1 parent 07e102d commit 93dac03

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

xml/System/Type.xml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
The following example calls the <xref:System.Object.GetType%2A?displayProperty=nameWithType> method to determine the runtime type of each object in an object array.
110110

111111
[!code-cpp[System.Type#2](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Type/cpp/GetType1.cpp#2)]
112-
[!code-csharp[System.Type#2](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Type/cs/GetType1.cs#2)]
112+
[!code-csharp-interactive[System.Type#2](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Type/cs/GetType1.cs#2)]
113113
[!code-vb[System.Type#2](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Type/vb/GetType1.vb#2)]
114114

115115
- The static <xref:System.Type.GetType%2A?displayProperty=nameWithType> methods return a <xref:System.Type> object that represents a type specified by its fully qualified name.
@@ -141,7 +141,7 @@
141141
A <xref:System.Type> object that represents a type is unique; that is, two <xref:System.Type> object references refer to the same object if and only if they represent the same type. This allows for comparison of <xref:System.Type> objects using reference equality. The following example compares the <xref:System.Type> objects that represent a number of integer values to determine whether they are of the same type.
142142

143143
[!code-cpp[System.Type#3](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Type/cpp/Equals1.cpp#3)]
144-
[!code-csharp[System.Type#3](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Type/cs/Equals1.cs#3)]
144+
[!code-csharp-interactive[System.Type#3](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Type/cs/Equals1.cs#3)]
145145
[!code-vb[System.Type#3](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Type/vb/Equals1.vb#3)]
146146

147147

@@ -153,7 +153,9 @@
153153

154154
> [!NOTE]
155155
> To be precise, the array contains two references to the instance of <xref:System.Type> that represents `int` in the current application domain. For any type, there is only one instance of <xref:System.Type> per application domain.
156-
156+
157+
[!INCLUDE[interactive-note](~/includes/csharp-interactive-note-some.md)]
158+
157159
The code example uses the <xref:System.Reflection.MethodInfo> to invoke the <xref:System.String.Substring%2A> method on the string "Hello, World!", and displays the result.
158160

159161
[!code-cpp[System.Type#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Type/cpp/source.cpp#1)]

0 commit comments

Comments
 (0)