[Mono-devel-list] MINI Bug
yoros at wanadoo.es
yoros at wanadoo.es
Mon Apr 14 13:19:07 EDT 2003
Hello,
A few days ago, I sent a mail reporting a bug in MINI. Here I repost the
testcase.
I found the bug while I was making a test program for Resources. The
tests I send are that. I don't know if the bug can be reproduced with
other test.
Can anybody tell me something about the origin of this bug?
Regards,
Pedro
--
Pedro Martinez Juliá
\ yoros at terra.es
)| yoros at wanadoo.es
/ http://yoros.cjb.net
Socio HispaLinux #311
Usuario Linux #275438 - http://counter.li.org
GnuPG public information: pub 1024D/74F1D3AC
Key fingerprint = 8431 7B47 D2B4 5A46 5F8E 534F 588B E285 74F1 D3AC
-------------- next part --------------
using System;
using System.IO;
using System.Reflection;
public class EntryPoint {
public static string resource_name = "SampleResource.res";
public static void Main (string[] args) {
Assembly assembly = Assembly.GetCallingAssembly();
Stream s = assembly.GetManifestResourceStream(resource_name);
if (s == null) {
throw new ArgumentException(resource_name + " does not exist");
}
StreamReader sr = new StreamReader(s);
string leido;
while ((leido = sr.ReadLine()) != null) {
Console.WriteLine(leido);
}
}
}
-------------- next part --------------
This is an example resource file
a
ab
abc
abcd
abcde
abcdef
abcdefg
-------------- next part --------------
using System;
using System.IO;
using System.Reflection;
public class EntryPoint {
public static string resource_name = "SampleResource.res";
public static void Main (string[] args) {
Assembly assembly = Assembly.GetCallingAssembly();
// HERE get synched
Console.WriteLine(resource_name);
// ----------------
Stream s = assembly.GetManifestResourceStream(resource_name);
if (s == null) {
throw new ArgumentException(resource_name + " does not exist");
}
StreamReader sr = new StreamReader(s);
string leido;
while ((leido = sr.ReadLine()) != null) {
Console.WriteLine(leido);
}
}
}
More information about the Mono-devel-list
mailing list