Passaggio all'ora legale 31 marzo 2024 02:00 03:00 sposta avanti l'orologio di 1 ora (si dorme 1 ora in meno)
Un metodo C# per scrivere su un file di testo (fn) la stringa contenuta in s
C#
using System.IO;

private static void WriteFile(string fn, string s)
{
	try
	{
		StreamWriter wr = File.CreateText(fn);
		wr.Write(s);
		wr.Close();
	}
	catch
	{
		MessageBox.Show("Can't write file.", "Error",
			MessageBoxButtons.OK,
	 		MessageBoxIcon.Error);
	}
	return;
}
Potrebbe interessarti anche: