[Mono-devel-list] MINI bug...
yoros at wanadoo.es
yoros at wanadoo.es
Sat Apr 12 15:23:52 EDT 2003
Hi,
I think that I've found a bug in MINI but I don't know which.
I was creating an application with resources...
I post two examples. The difference between them is the writing of a
string (I think that it syncs there).
See you,
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 = "file.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 --------------
using System;
using System.IO;
using System.Reflection;
public class EntryPoint {
public static string resource_name = "file.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);
}
}
}
-------------- next part --------------
This is an example resource file
a
ab
abc
abcd
abcde
abcdef
abcdefg
More information about the Mono-devel-list
mailing list