File tree Expand file tree Collapse file tree 3 files changed +48
-15
lines changed
csharp/VS_Snippets_CLR/Cryptography.HashAlgorithm.TransformFinalBlock/CS
visualbasic/VS_Snippets_CLR/Cryptography.HashAlgorithm.TransformFinalBlock/vb Expand file tree Collapse file tree 3 files changed +48
-15
lines changed Original file line number Diff line number Diff line change @@ -61,4 +61,22 @@ public static void PrintHashMultiBlock(byte[] input, int size)
61
61
Console . WriteLine ( "MultiBlock {0:00}: {1}" , size , BytesToStr ( sha . Hash ) ) ;
62
62
}
63
63
}
64
+ /*
65
+ This example produces output similar to the following:
66
+
67
+ Input : 45D97219908A572DE336B9DEC787C311D3349F69
68
+
69
+ ComputeHash : 84E87322C7E3BCA848B0A698EE66E9A9725DA786F9FD4FFD46C385F59AB35B15
70
+ FinalBlock : 84E87322C7E3BCA848B0A698EE66E9A9725DA786F9FD4FFD46C385F59AB35B15
71
+ MultiBlock 01: 84E87322C7E3BCA848B0A698EE66E9A9725DA786F9FD4FFD46C385F59AB35B15
72
+ MultiBlock 02: 84E87322C7E3BCA848B0A698EE66E9A9725DA786F9FD4FFD46C385F59AB35B15
73
+ MultiBlock 03: 84E87322C7E3BCA848B0A698EE66E9A9725DA786F9FD4FFD46C385F59AB35B15
74
+ MultiBlock 05: 84E87322C7E3BCA848B0A698EE66E9A9725DA786F9FD4FFD46C385F59AB35B15
75
+ MultiBlock 10: 84E87322C7E3BCA848B0A698EE66E9A9725DA786F9FD4FFD46C385F59AB35B15
76
+ MultiBlock 11: 84E87322C7E3BCA848B0A698EE66E9A9725DA786F9FD4FFD46C385F59AB35B15
77
+ MultiBlock 19: 84E87322C7E3BCA848B0A698EE66E9A9725DA786F9FD4FFD46C385F59AB35B15
78
+ MultiBlock 20: 84E87322C7E3BCA848B0A698EE66E9A9725DA786F9FD4FFD46C385F59AB35B15
79
+ MultiBlock 21: 84E87322C7E3BCA848B0A698EE66E9A9725DA786F9FD4FFD46C385F59AB35B15
80
+
81
+ */
64
82
// </Snippet1>
Original file line number Diff line number Diff line change @@ -57,4 +57,20 @@ Class Program
57
57
Console.WriteLine( "MultiBlock {0:00}: {1}" , size, BytesToStr(sha.Hash))
58
58
End Sub
59
59
End Class
60
+
61
+ ' This example produces output similar to the following:
62
+ '
63
+ ' Input : 45D97219908A572DE336B9DEC787C311D3349F69
64
+ '
65
+ ' ComputeHash : 84E87322C7E3BCA848B0A698EE66E9A9725DA786F9FD4FFD46C385F59AB35B15
66
+ ' FinalBlock : 84E87322C7E3BCA848B0A698EE66E9A9725DA786F9FD4FFD46C385F59AB35B15
67
+ ' MultiBlock 01: 84E87322C7E3BCA848B0A698EE66E9A9725DA786F9FD4FFD46C385F59AB35B15
68
+ ' MultiBlock 02: 84E87322C7E3BCA848B0A698EE66E9A9725DA786F9FD4FFD46C385F59AB35B15
69
+ ' MultiBlock 03: 84E87322C7E3BCA848B0A698EE66E9A9725DA786F9FD4FFD46C385F59AB35B15
70
+ ' MultiBlock 05: 84E87322C7E3BCA848B0A698EE66E9A9725DA786F9FD4FFD46C385F59AB35B15
71
+ ' MultiBlock 10: 84E87322C7E3BCA848B0A698EE66E9A9725DA786F9FD4FFD46C385F59AB35B15
72
+ ' MultiBlock 11: 84E87322C7E3BCA848B0A698EE66E9A9725DA786F9FD4FFD46C385F59AB35B15
73
+ ' MultiBlock 19: 84E87322C7E3BCA848B0A698EE66E9A9725DA786F9FD4FFD46C385F59AB35B15
74
+ ' MultiBlock 20: 84E87322C7E3BCA848B0A698EE66E9A9725DA786F9FD4FFD46C385F59AB35B15
75
+ ' MultiBlock 21: 84E87322C7E3BCA848B0A698EE66E9A9725DA786F9FD4FFD46C385F59AB35B15
60
76
' </Snippet1>
Original file line number Diff line number Diff line change @@ -2392,13 +2392,13 @@ This example shows the output of the <xref:System.Type.GetConstructors> overload
2392
2392
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_Classic/classic Type.GetConstructors Example/CS/source1.cs" interactive="try-dotnet" id="Snippet1":::
2393
2393
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_Classic/classic Type.GetConstructors Example/VB/source1.vb" id="Snippet1":::
2394
2394
2395
- The output of this code is:
2396
-
2397
- 2
2398
-
2399
- False
2400
-
2401
- False
2395
+ The output of this code is:
2396
+
2397
+ ```output
2398
+ 2
2399
+ False
2400
+ False
2401
+ ```
2402
2402
2403
2403
Because the <xref:System.Type.GetConstructors%2A> overload uses only <xref:System.Reflection.BindingFlags.Public> and <xref:System.Reflection.BindingFlags.Instance>, the static constructor is neither counted by the `for` expression nor evaluated by `IsStatic`.
2404
2404
@@ -2409,14 +2409,13 @@ This example shows the output of the <xref:System.Type.GetConstructors> overload
2409
2409
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_Classic/classic Type.GetConstructors Example/VB/source2.vb" id="Snippet2":::
2410
2410
2411
2411
Now the output is:
2412
-
2413
- 3
2414
-
2415
- False
2416
-
2417
- True
2418
-
2419
- False
2412
+
2413
+ ```output
2414
+ 3
2415
+ False
2416
+ True
2417
+ False
2418
+ ```
2420
2419
2421
2420
]]></format>
2422
2421
</remarks>
You can’t perform that action at this time.
0 commit comments