dotgnu-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [DotGNU]System.IO.StreamReader lists field Null twice


From: Thomas Lozza
Subject: Re: [DotGNU]System.IO.StreamReader lists field Null twice
Date: Sat, 01 Mar 2003 22:15:09 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021204

hey Gopal
me has downloaded the sources from the cvs.. but pnet does not compile anymore... says some undefined references: ILGenericParCreate, ILGenericParSetName, ILGenericParSetKind .. etc. and the linker ld aborts... i managed to compile treecc.. but .. the error sounds as when some libraries were missing.. sorry for disturbing u with compile stuff.. but i hoped that i might find a solution to the following problem: the "System" assembly is not found by reflection... see attachment... and another thing: when the first line (using bla bla..) is commented out.. cscc comes up with an error message though it shouldnt..
(with the official 0.5.2 release)
-- tom

Gopal V wrote:
If memory serves me right, Thomas Lozza wrote:

been fixed in CVS .

.. wanna grap the newest sources but cant ping subversions.gnu.org at the moment.. is it just me???


Most likely , your firewalls might be blocking CVS access. In that case
you might want to look at port 443 CVS access in subversions ;-)

Or if your institution is HTTP proxied (like mine) , you might want to get it off the Savannah backups section for an unofficial CVS snapshot.

http://savannah.gnu.org/cvs.backups/


.. mhh.. but how do i know which Null is the one of the StreamReader class?? is it the one of type StreamReader or the one of type


I can't test it in .NET , so I can't say for sure . Anyway mono won't run it and mint gives exactly the same answer.


TextReader.. most probabely of StreamReader but how can i be sure, ie. how can my compiler (oberon) be sure?


What I'm asking is that -- are you getting different results with MS.NET ?
I think the problem could be fixed relatively easily , if I knew what it
actually needs.

My question is reflected by the attached code.

Btw, the compiler should not have to worry too much ... as this is a static field. StreamReader.Null and TextReader.Null should give the right class to pick ..


i'd say yes.. - if not shadowed..


They are not shadowed (aka overriden) as both are of different types.
I don't think I could put those in the same slots ?.

Gopal


------------------------------------------------------------------------

using System;
using System.Reflection;

public class baseclass
{
        public static readonly String Null="(null)";
}
public class childclass : baseclass
{
        public new static readonly int Null = 0;
}
public class test
{
        public static void Main()
        {
                FieldInfo[] fields;
                fields = typeof(childclass).GetFields(
                                                        BindingFlags.Public |
                                                        BindingFlags.Static );
                foreach(FieldInfo f in fields)
                {
                        Console.WriteLine("fieldname={0}",f.Name);
                }
        }
}

//using System.Reflection;
class s19f {
        public static void Main() {
                System.Reflection.Assembly loadedAssembly = 
                        
System.Reflection.Assembly.LoadWithPartialName("System");
                if (loadedAssembly == null) 
                        System.Console.WriteLine("failed");
                else
                        System.Console.WriteLine("done");
        }
}

reply via email to

[Prev in Thread] Current Thread [Next in Thread]