projects
/
mono.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
2007-10-18 Zoltan Varga <vargaz@gmail.com>
[mono.git]
/
mono
/
tests
/
stream.cs
1
using System;
2
using System.IO;
3
4
public class Test {
5
6
public static int Main () {
7
byte[] buf = new byte [20];
8
int i;
9
FileStream s = new FileStream ("stest.dat", FileMode.OpenOrCreate, FileAccess.ReadWrite);
10
for (i=0; i < 20; ++i)
11
buf [i] = 65;
12
s.Write (buf, 0, 20);
13
s.Position = 0;
14
for (i=0; i < 20; ++i)
15
buf [i] = 66;
16
s.Read (buf, 0, 20);
17
for (i=0; i < 20; ++i)
18
if (buf [i] != 65)
19
return 1;
20
21
return 0;
22
}
23
}
24
25