Azmyth.Editor.PropertyGridExtensions.GetPropertyGridView C# (CSharp) Method

GetPropertyGridView() private static method

Gets the (private) PropertyGridView instance.
private static GetPropertyGridView ( System.Windows.Forms.PropertyGrid propertyGrid ) : object
propertyGrid System.Windows.Forms.PropertyGrid The property grid.
return object
        private static object GetPropertyGridView(PropertyGrid propertyGrid)
        {
            //private PropertyGridView GetPropertyGridView();
            //PropertyGridView is an internal class...
            MethodInfo methodInfo = typeof(PropertyGrid).GetMethod("GetPropertyGridView", BindingFlags.NonPublic | BindingFlags.Instance);
            return methodInfo.Invoke(propertyGrid, new object[] { });
        }