Hi,

So far, I'm not getting too much love from the bold C# lines (see below) 
for the following class definition.  I want to know when is an initial 
value for a field (e.g. 1234) and then dependent on the field type, get the 
actual value.

using System.Numerics;


namespace NPC.dApps.NeoDraw
{
    public class NeoCounter:   NPCLevel0Basic,
                        NPCLevel1Managed,
                        NPCLevel2Persistable,
                        NPCLevel3Deletable,
                        NPCLevel4Collectible
    {
        public BigInteger nextIndex = 1234;
    }
}



Mono-cecil code:

                    foreach (FieldDefinition f in t.Fields)
                    {
                        if (Trace.Verbose) Console.WriteLine("    Field 
Name:\t" + f.Name);
                        if (Trace.Verbose) Console.WriteLine("     
 f.Fullname:\t" + f.FullName);
                        //if (Trace.Verbose) Console.WriteLine("     
 f.Module.FullyQualifiedName:\t" + f.Module.FullyQualifiedName);
                        if (Trace.Verbose) Console.WriteLine("     
 f.DeclaringType:\t" + f.DeclaringType.ToString());
                        if (Trace.Verbose) Console.WriteLine("     
 f.FieldType:\t" + f.FieldType.ToString());
                        if (Trace.Verbose) Console.WriteLine("     
 f.IsPrivate:\t" + f.IsPrivate.ToString());
                        if (Trace.Verbose) Console.WriteLine("     
 f.IsPublic:\t" + f.IsPublic.ToString());














*                        if (Trace.Verbose) Console.WriteLine("     
 f.HasConstant:\t" + f.HasConstant.ToString());                        if 
(f.Constant != null) if (Trace.Verbose) Console.WriteLine("     
 f.Constant:\t" + f.Constant.ToString());                        if 
(Trace.Verbose) Console.WriteLine("      f.HasDefault:\t" + 
f.HasDefault.ToString());                        if (f.InitialValue != 
null)                        {                            if 
(Trace.Verbose) Console.WriteLine("      f.InitialValue:\t" + 
f.InitialValue.ToString());                            if (Trace.Verbose) 
Console.WriteLine("      f.InitialValue.Length:\t" + 
f.InitialValue.Length.ToString());                            if 
(f.InitialValue.Length > 0)                            {                    
            Int32 initialValue = BitConverter.ToInt32(f.InitialValue, 0);  
                              if (Trace.Verbose) Console.WriteLine("     
 f.InitialValue:\t" + initialValue.ToString());                            
                        }                        }*




Best regards,
Michael Herman (Toronto)

-- 
-- 
--
mono-cecil
--- 
You received this message because you are subscribed to the Google Groups 
"mono-cecil" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to