I found this code on this Microsoft page: [Microsoft Dynamic XML Parser](https://blogs.msdn.microsoft.com/mcsuksoldev/2010/02/04/dynamic-xml-reader-with-c-and-net-4-0/)

```
 public string this[string dbName]
    {
        get
        {
            return xmlSQL.Attribute(dbName).Value;
        }
    }

```

i would like to use this funcionality but instead of just returning an object like in the Microsoft example i like to receive a predefined Type.

```
DynamicXmlParser parser = new DynamicXmlParser(@".\order.xml");
int s = parser.element;

```

and my intellisense and the compiler knows what he will get.