Write to file not working (StreamWriter)
using System;
using System.Numerics;
using System.Text;
using System.IO;
namespace Username
{
class Program
{
static void Main()
{
bool end = false;
string filePath = @"C:\Users\Administrator\Desktop\HEXes.txt";
StreamWriter hap = new(filePath, false, Encoding.Unicode);
hap.WriteLine($"{F:N0} is {F:X}"); // there are variables I didn't mention, I just wanted to show here I write to file
hap.Close();
Console.ForegroundColor = ConsoleColor.Yellow;
Console.Write("\nPress any key to continue...");
Console.ReadKey();
}
}
}
using System;
using System.Numerics;
using System.Text;
using System.IO;
namespace Username
{
class Program
{
static void Main()
{
bool end = false;
string filePath = @"C:\Users\Administrator\Desktop\HEXes.txt";
StreamWriter hap = new(filePath, false, Encoding.Unicode);
hap.WriteLine($"{F:N0} is {F:X}"); // there are variables I didn't mention, I just wanted to show here I write to file
hap.Close();
Console.ForegroundColor = ConsoleColor.Yellow;
Console.Write("\nPress any key to continue...");
Console.ReadKey();
}
}
}
0 Replies