Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>

</Project>
22 changes: 11 additions & 11 deletions snippets/csharp/System.Security/SecureString/AppendChar/xat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
using System;
using System.Security;

class Example
class SecureStringExample
{
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);
Expand Down Expand Up @@ -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
//</snippet1>
// The current length of the SecureString object: 0
//</snippet1>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>

</Project>
20 changes: 10 additions & 10 deletions snippets/visualbasic/VS_Snippets_CLR/SecureString.xAt/VB/xat.vb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
'</snippet1>
' The current length of the SecureString object: 0
'</snippet1>