Added MemoryStreamDebugVisualizer
This commit is contained in:
23
MemoryStreamDebugVisualizer/TestApp/Program.cs
Normal file
23
MemoryStreamDebugVisualizer/TestApp/Program.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
// <copyright file="Program.cs" company="PlaceholderCompany">
|
||||
// Copyright (c) PlaceholderCompany. All rights reserved.
|
||||
// </copyright>
|
||||
|
||||
using System.Text;
|
||||
|
||||
// Initialize a MemoryStream to store user input temporarily
|
||||
using MemoryStream userInputStream = new();
|
||||
|
||||
// Convert user input string to byte array
|
||||
string userInput = "Sample user input data";
|
||||
|
||||
byte[] inputData = Encoding.UTF8.GetBytes(userInput);
|
||||
|
||||
// Write user input data to the MemoryStream
|
||||
userInputStream.Write(inputData, 0, inputData.Length);
|
||||
var buffer = new byte[inputData.Length];
|
||||
userInputStream.Position = 0;
|
||||
userInputStream.Read(buffer);
|
||||
var text = Encoding.UTF8.GetString(buffer, 0, buffer.Length);
|
||||
|
||||
// Perform further processing with the stored user input
|
||||
Thread.Sleep(1000);
|
||||
14
MemoryStreamDebugVisualizer/TestApp/TestApp.csproj
Normal file
14
MemoryStreamDebugVisualizer/TestApp/TestApp.csproj
Normal file
@@ -0,0 +1,14 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<AdditionalFiles Remove="C:\Users\heilm\source\repos\DebugVisualizer\stylecop.json" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
Reference in New Issue
Block a user