Referencing Embedded/Nested Types

If you are using the various indirect wwDotnetBridge methods to access 'embedded types' that are nested within another .NET type the type referencing syntax has to include a + instead of a . when traversing the nested type.

For example:

loBridge = CreateObject("wwDotNetBridge","V4")
? loBridge.LoadAssembly("c:\users\rick\documents\visual studio 2013\Projects\Lucene\Lucene\bin\debug\lucene.net.dll")

? loBridge.getStaticProperty( "Lucene.Net.Index.IndexWriter+MaxFieldLength","LIMITED" )

Notice the + in before the MaxFieldLength property.

The IndexWriter type in this case contains the MaxFieldLength type:

public class IndexWriter 
{
     ...
     // Nested class
     public class MaxFieldLength
     {
        public static readonly int LIMITED {get; set;} 
     }
}

© West Wind Technologies, 2023 • Updated: 10/21/22
Comment or report problem with topic