Added MemoryStreamDebugVisualizer

This commit is contained in:
Matthias Heil
2026-01-13 11:40:39 +01:00
parent 38246e4fe8
commit e48d6a63f8
13 changed files with 626 additions and 0 deletions

View 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);

View 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>