From 22f66baed6f72d7ce0fa68d13f3913a2799a4296 Mon Sep 17 00:00:00 2001 From: Makazeu Date: Thu, 19 Sep 2024 22:03:08 +0800 Subject: [PATCH 1/5] Fixed typo in xat.vb --- .../SecureString.xAt/VB/xat.vb | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/snippets/visualbasic/VS_Snippets_CLR/SecureString.xAt/VB/xat.vb b/snippets/visualbasic/VS_Snippets_CLR/SecureString.xAt/VB/xat.vb index eef60d0443e..e113b806c74 100644 --- a/snippets/visualbasic/VS_Snippets_CLR/SecureString.xAt/VB/xat.vb +++ b/snippets/visualbasic/VS_Snippets_CLR/SecureString.xAt/VB/xat.vb @@ -3,7 +3,7 @@ Imports System.Security Module Example Public Sub Main() - Dim msg As String = "The curent length of the SecureString object: {0}" + vbCrLf + Dim msg As String = "The current length of the SecureString object: {0}" + vbCrLf Console.WriteLine("1) Instantiate the SecureString object.") Dim ss As New SecureString() Console.WriteLine(msg, ss.Length) @@ -41,26 +41,26 @@ Module Example End Module ' The example displays the following output: ' 1) Instantiate the SecureString object. -' The curent length of the SecureString object: 0 +' The current length of the SecureString object: 0 ' ' 2) Append 'a' to the value. -' The curent length of the SecureString object: 1 +' The current length of the SecureString object: 1 ' ' 3) Append 'X' to the value. -' The curent length of the SecureString object: 2 +' The current length of the SecureString object: 2 ' ' 4) Append 'c' to the value. -' The curent length of the SecureString object: 3 +' The current length of the SecureString object: 3 ' ' 5) Insert 'd' at the end of the value. -' The curent length of the SecureString object: 4 +' The current length of the SecureString object: 4 ' ' 6) Remove the last character ('d') from the value. -' The curent length of the SecureString object: 3 +' The current length of the SecureString object: 3 ' ' 7) Set the second character of the value to 'b'. -' The curent length of the SecureString object: 3 +' The current length of the SecureString object: 3 ' ' 8) Delete the value of the SecureString object: -' The curent length of the SecureString object: 0 -' \ No newline at end of file +' The current length of the SecureString object: 0 +' From 852a2f96a1cc6591d926ab0bda4d521f51fcd480 Mon Sep 17 00:00:00 2001 From: Makazeu Date: Thu, 19 Sep 2024 22:05:09 +0800 Subject: [PATCH 2/5] Fix typo in csharp's xat.cs --- .../SecureString/AppendChar/xat.cs | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/snippets/csharp/System.Security/SecureString/AppendChar/xat.cs b/snippets/csharp/System.Security/SecureString/AppendChar/xat.cs index 102cd2f3361..da705f6cdd0 100644 --- a/snippets/csharp/System.Security/SecureString/AppendChar/xat.cs +++ b/snippets/csharp/System.Security/SecureString/AppendChar/xat.cs @@ -6,7 +6,7 @@ class Example { public static void Main() { - string msg = "The curent length of the SecureString object: {0}\n"; + string msg = "The current length of the SecureString object: {0}\n"; Console.WriteLine("1) Instantiate the SecureString object."); SecureString ss = new SecureString(); Console.WriteLine(msg, ss.Length); @@ -44,26 +44,26 @@ public static void Main() } // The example displays the following output: // 1) Instantiate the SecureString object. -// The curent length of the SecureString object: 0 +// The current length of the SecureString object: 0 // // 2) Append 'a' to the value. -// The curent length of the SecureString object: 1 +// The current length of the SecureString object: 1 // // 3) Append 'X' to the value. -// The curent length of the SecureString object: 2 +// The current length of the SecureString object: 2 // // 4) Append 'c' to the value. -// The curent length of the SecureString object: 3 +// The current length of the SecureString object: 3 // // 5) Insert 'd' at the end of the value. -// The curent length of the SecureString object: 4 +// The current length of the SecureString object: 4 // // 6) Remove the last character ('d') from the value. -// The curent length of the SecureString object: 3 +// The current length of the SecureString object: 3 // // 7) Set the second character of the value to 'b'. -// The curent length of the SecureString object: 3 +// The current length of the SecureString object: 3 // // 8) Delete the value of the SecureString object: -// The curent length of the SecureString object: 0 -// \ No newline at end of file +// The current length of the SecureString object: 0 +// From 0e1341a44071116b21abebddba4651788075dd20 Mon Sep 17 00:00:00 2001 From: Makazeu Date: Thu, 19 Sep 2024 22:19:25 +0800 Subject: [PATCH 3/5] Create Project.csproj for SecureString/AppendChar --- .../SecureString/AppendChar/Project.csproj | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 snippets/csharp/System.Security/SecureString/AppendChar/Project.csproj diff --git a/snippets/csharp/System.Security/SecureString/AppendChar/Project.csproj b/snippets/csharp/System.Security/SecureString/AppendChar/Project.csproj new file mode 100644 index 00000000000..0735dba1f6d --- /dev/null +++ b/snippets/csharp/System.Security/SecureString/AppendChar/Project.csproj @@ -0,0 +1,8 @@ + + + + Library + net6.0 + + + From 60bd4087a4d6b4c1f66327bc6621d6b336360df6 Mon Sep 17 00:00:00 2001 From: Makazeu Date: Thu, 19 Sep 2024 22:31:56 +0800 Subject: [PATCH 4/5] Update xat.cs --- snippets/csharp/System.Security/SecureString/AppendChar/xat.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snippets/csharp/System.Security/SecureString/AppendChar/xat.cs b/snippets/csharp/System.Security/SecureString/AppendChar/xat.cs index da705f6cdd0..2c368cbbde3 100644 --- a/snippets/csharp/System.Security/SecureString/AppendChar/xat.cs +++ b/snippets/csharp/System.Security/SecureString/AppendChar/xat.cs @@ -2,7 +2,7 @@ using System; using System.Security; -class Example +class SecureStringExample { public static void Main() { From 5e8189888f8978ef5773150cb852d6f2f460e6b7 Mon Sep 17 00:00:00 2001 From: Makazeu Date: Thu, 19 Sep 2024 22:41:25 +0800 Subject: [PATCH 5/5] Create Project.vbproj for visualbasic/VS_Snippets_CLR/SecureString --- .../VS_Snippets_CLR/SecureString.xAt/VB/Project.vbproj | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 snippets/visualbasic/VS_Snippets_CLR/SecureString.xAt/VB/Project.vbproj diff --git a/snippets/visualbasic/VS_Snippets_CLR/SecureString.xAt/VB/Project.vbproj b/snippets/visualbasic/VS_Snippets_CLR/SecureString.xAt/VB/Project.vbproj new file mode 100644 index 00000000000..41f1d5ad4b2 --- /dev/null +++ b/snippets/visualbasic/VS_Snippets_CLR/SecureString.xAt/VB/Project.vbproj @@ -0,0 +1,8 @@ + + + + Exe + net6.0 + + +