Skip to content

Commit b2c7686

Browse files
authored
output fixes for batch 17 (dotnet#4648)
1 parent 534bd16 commit b2c7686

File tree

10 files changed

+83
-53
lines changed

10 files changed

+83
-53
lines changed

samples/snippets/cpp/VS_Snippets_CLR/Type_FindMembers/CPP/type_findmembers.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,8 @@ int main()
4141
{
4242
MyFindMembersClass::Test();
4343
}
44+
/* The example produces the following output:
4445
46+
Result of FindMembers - Boolean ReferenceEquals(System.Object, System.Object)
47+
*/
4548
// </Snippet1>

samples/snippets/cpp/VS_Snippets_CLR/Type_IsInterface/CPP/type_isinterface.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,9 @@ void main()
2727
Console::WriteLine( "\nAn exception occurred: {0}.", e->Message );
2828
}
2929
}
30+
/* The example produces the following output:
31+
32+
Is the specified type an interface? True.
33+
Is the specified type an interface? False.
34+
*/
3035
// </Snippet1>

samples/snippets/cpp/VS_Snippets_CLR_Classic/classic Type.DeclaringType Example/CPP/source.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,8 @@ int main()
1919
{
2020
Console::WriteLine( "The declaring type of m is {0}.", dtype::MyClassB::typeid->GetMethod( "m" )->DeclaringType );
2121
}
22+
/* The example produces the following output:
23+
24+
The declaring type of m is dtype+MyClassA.
25+
*/
2226
// </Snippet1>

samples/snippets/csharp/VS_Snippets_CLR/Type_FindMembers/CS/type_findmembers.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,8 @@ public static bool DelegateToSearchCriteria(MemberInfo objMemberInfo, Object obj
3434
return false;
3535
}
3636
}
37+
/* The example produces the following output:
38+
39+
Result of FindMembers - Boolean ReferenceEquals(System.Object, System.Object)
40+
*/
3741
// </Snippet1>

samples/snippets/csharp/VS_Snippets_CLR/Type_IsInterface/CS/type_isinterface.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,9 @@ public static void Main(string []args)
2525
}
2626
}
2727
}
28+
/* The example produces the following output:
29+
30+
Is the specified type an interface? True.
31+
Is the specified type an interface? False.
32+
*/
2833
// </Snippet1>

samples/snippets/csharp/VS_Snippets_CLR_Classic/classic Type.DeclaringType Example/CS/source.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,8 @@ public static void Main(string[] args)
2020
typeof(MyClassB).GetMethod("m").DeclaringType);
2121
}
2222
}
23+
/* The example produces the following output:
24+
25+
The declaring type of m is dtype+MyClassA.
26+
*/
2327
// </Snippet1>

samples/snippets/csharp/VS_Snippets_CLR_System/system.decimal.equals/cs/equalsoverl.cs

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -57,33 +57,33 @@ private static void TestObjectForEquality(Object obj)
5757
}
5858
}
5959
// The example displays the following output:
60-
// value = byte1: True
61-
// 112 (Double) = 112 (Byte): False
60+
// value = byte1: True
61+
// 112 (Decimal) = 112 (Byte): False
6262
//
63-
// value = short1: True
64-
// 112 (Double) = 112 (Int16): False
63+
// value = short1: True
64+
// 112 (Decimal) = 112 (Int16): False
6565
//
66-
// value = int1: True
67-
// 112 (Double) = 112 (Int32): False
66+
// value = int1: True
67+
// 112 (Decimal) = 112 (Int32): False
6868
//
69-
// value = long1: True
70-
// 112 (Double) = 112 (Int64): False
69+
// value = long1: True
70+
// 112 (Decimal) = 112 (Int64): False
7171
//
72-
// value = sbyte1: True
73-
// 112 (Double) = 112 (SByte): False
72+
// value = sbyte1: True
73+
// 112 (Decimal) = 112 (SByte): False
7474
//
75-
// value = ushort1: True
76-
// 112 (Double) = 112 (UInt16): False
75+
// value = ushort1: True
76+
// 112 (Decimal) = 112 (UInt16): False
7777
//
78-
// value = uint1: True
79-
// 112 (Double) = 112 (UInt32): False
78+
// value = uint1: True
79+
// 112 (Decimal) = 112 (UInt32): False
8080
//
81-
// value = ulong1: True
82-
// 112 (Double) = 112 (UInt64): False
81+
// value = ulong1: True
82+
// 112 (Decimal) = 112 (UInt64): False
8383
//
84-
// value = dec1: False
85-
// 112 (Double) = 112 (Decimal): False
84+
// value = sng1: False
85+
// 112 (Decimal) = 112 (Single): False
8686
//
87-
// value = sng1: True
88-
// 112 (Double) = 112 (Single): False
87+
// value = dbl1: False
88+
// 112 (Decimal) = 112 (Double): False
8989
// </Snippet2>

samples/snippets/visualbasic/VS_Snippets_CLR/Type_FindMembers/VB/type_findmembers.vb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,7 @@ Class MyFindMembersClass
3838
End If
3939
End Function 'DelegateToSearchCriteria
4040
End Class
41+
' The example produces the following output:
42+
'
43+
' Result of FindMembers - Boolean ReferenceEquals(System.Object, System.Object)
4144
' </Snippet1>
Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
11
' <Snippet1>
22
' Declare an interface.
3-
Interface IInterface
3+
Interface myIFace
44
End Interface
55

6-
Class Example : Implements IInterface
7-
Public Shared Sub Main()
8-
' Determine whether IInterface is an interface.
9-
Dim isInterface1 As Boolean = GetType(IInterface).IsInterface
10-
Console.WriteLine("Is IInterface an interface? {0}", isInterface1)
6+
Class MyIsInterface
7+
Public Shared Sub Main()
8+
' Get the IsInterface attribute for myIFace.
9+
Dim myBool1 As Boolean = GetType(myIFace).IsInterface
10+
Console.WriteLine("Is the specified type an interface? {0}.", myBool1)
1111

12-
' Determine whether Example is an interface.
13-
Dim isInterface2 As Boolean = GetType(Example).IsInterface
14-
Console.WriteLine("Is Example an interface? {0}", isInterface2)
15-
End Sub
16-
End Class
12+
' Determine whether Example is an interface.
13+
Dim myBool2 As Boolean = GetType(MyIsInterface).IsInterface
14+
Console.WriteLine("Is the specified type an interface? {0}.", myBool2)
15+
Console.ReadLine()
16+
17+
End Sub
18+
End Class
1719
' The example displays the following output:
18-
' Is IInterface an interface? True
19-
' Is Example an interface? False
20+
' Is the specified type an interface? True.
21+
' Is the specified type an interface? False.
2022
' </Snippet1>

samples/snippets/visualbasic/VS_Snippets_CLR_System/system.decimal.equals/vb/equalsoverl.vb

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -56,33 +56,33 @@ Module Example
5656
End Sub
5757
End Module
5858
' The example displays the following output:
59-
' value = byte1: True
60-
' 112 (Double) = 112 (Byte): False
59+
' value = byte1: True
60+
' 112 (Decimal) = 112 (Byte): False
6161
'
62-
' value = short1: True
63-
' 112 (Double) = 112 (Int16): False
62+
' value = short1: True
63+
' 112 (Decimal) = 112 (Int16): False
6464
'
65-
' value = int1: True
66-
' 112 (Double) = 112 (Int32): False
65+
' value = int1: True
66+
' 112 (Decimal) = 112 (Int32): False
6767
'
68-
' value = long1: True
69-
' 112 (Double) = 112 (Int64): False
68+
' value = long1: True
69+
' 112 (Decimal) = 112 (Int64): False
7070
'
71-
' value = sbyte1: True
72-
' 112 (Double) = 112 (SByte): False
71+
' value = sbyte1: True
72+
' 112 (Decimal) = 112 (SByte): False
7373
'
74-
' value = ushort1: True
75-
' 112 (Double) = 112 (UInt16): False
74+
' value = ushort1: True
75+
' 112 (Decimal) = 112 (UInt16): False
7676
'
77-
' value = uint1: True
78-
' 112 (Double) = 112 (UInt32): False
77+
' value = uint1: True
78+
' 112 (Decimal) = 112 (UInt32): False
7979
'
80-
' value = ulong1: True
81-
' 112 (Double) = 112 (UInt64): False
80+
' value = ulong1: True
81+
' 112 (Decimal) = 112 (UInt64): False
8282
'
83-
' value = dec1: True
84-
' 112 (Double) = 112 (Decimal): False
83+
' value = sng1: False
84+
' 112 (Decimal) = 112 (Single): False
8585
'
86-
' value = sng1: True
87-
' 112 (Double) = 112 (Single): False
86+
' value = dbl1: False
87+
' 112 (Decimal) = 112 (Double): False
8888
' </Snippet2>

0 commit comments

Comments
 (0)