Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void create()
- {
- string name;
- Console.WriteLine("Wprowadz nazwę pliku");
- name = Console.ReadLine();
- byte[] a = new byte[10];
- Console.WriteLine("Wpisz zawartość pliku");
- string zawartosc;
- zawartosc = Console.ReadLine();
- a = Encoding.ASCII.GetBytes(zawartosc);
- try
- {
- if (DISK[x] != 0)
- {
- x = x + 32;
- if (DISK[x] != 0)
- {
- x = x + 32;
- }
- }
- int r = 0;
- for (int i = x; i < (a.Length + x); i++)
- {
- DISK[i] = a[r++];
- }
- for (int indeks = 0; indeks < DISK_SIZE; indeks++)
- {
- Console.WriteLine(DISK[indeks]);
- }
- zapisz(name, x, a.Length);
- }
- catch (IndexOutOfRangeException)
- {
- Console.WriteLine("Nastąpiło właśnie przepełnienie indeksu");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement