I tried to get the Namespace of types, and found that the namespace for Struct 
or inner Class is empty.
This is causing a problem when I want to do analysis on a bigger project.
Is there a problem with Cecil or?

Thanks,
LY

-------------------------------------------------------------------------------------------------------------------------------------------
This is the following output I got...
***************************************************************************************
Namespace: TestTest
Type: TestTest.Test

Namespace: 
Type: TestTest.Test/innerClassTest

Namespace: 
Type: TestTest.Test/structTest

***************************************************************************************
...using the piece of code below...
***************************************************************************************

        public override void 
VisitTypeDefinitionCollection(TypeDefinitionCollection types)
        {
            foreach (TypeDefinition item in types)
            {
                if (item.Name != "<Module>")                
                {
                     MessageBox.Show("Namespace: " + item.Namespace + "\nType: 
" + item.FullName);      
                    item.Accept(this);
                }
            }
        }

***************************************************************************************
...on this project...
***************************************************************************************

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ClassLibrary1;

namespace TestTest
{
    class Test
    {
        class innerClassTest
        {
            int xyz;
        }

        struct structTest
        {
            int abc;
        }

        static void Main(string[] args)
        {
        }
    }
}

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

-- 
--
mono-cecil

Reply via email to