Lo que tengo descalibrado es el tornillo horizontal del eje X que estoy enderechando ojo a ojo. Para que no se me cuelgue en algunas partes del juego a la hora de cargar.
Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.
Mostrar Mensajes Menú
using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Diagnostics.CodeAnalysis;
namespace CMD_serie
{
class Program
{
private const string FILE_NAME = "Archivo.txt";
public static BinaryWriter sw;
public static void data(IAsyncResult x)
{
sw.BaseStream.EndWrite(x);
}
static void Main(string[] args)
{
byte[] datos = Encoding.ASCII.GetBytes((new string('A', 45000000)));
if (File.Exists(FILE_NAME))
{
Console.WriteLine("{0} ya existe.", FILE_NAME);
Console.ReadKey();
return;
}
FileStream fs = new FileStream(FILE_NAME, FileMode.Create);
sw = new BinaryWriter(fs);
for (long i = 1; i <= 30; i++) // En lugar de escribir 9999999999999999 pocos bytes
{ // Mejor escribo 45000000 de letras A 30 veces
sw.BaseStream.Flush();
sw.BaseStream.BeginWrite(datos, 0, datos.Length, new AsyncCallback(data), sw);//sw.Close();
}
sw.Close();
}
}
}
while (true)
{
Console.WriteLine(i);
sw.WriteLine(i);
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO; // No olvidar desde aquí.
namespace CMD_Serie
{
class Program
{
private const string FILE_NAME = "Archivo.txt";
static void Main(string[] args)
{
if (File.Exists(FILE_NAME))
{
Console.WriteLine("{0} ya existe.", FILE_NAME);
Console.ReadKey();
return;
}
using (StreamWriter sw = File.CreateText(FILE_NAME))
{
for (long i = 1; i <= 999999999999999999; i++)
{
Console.WriteLine(i);
sw.WriteLine(i);
//sw.Close();
}
}
}
}
}
Cita de: Martin-Ph03n1X en 2 Diciembre 2009, 01:03 AM
miren esto detalles detalles y mas detalles =D
http://vcanero.tripod.com/smartcards/esp/intro.html