static class A { public int bar; protected string foo; private int baz; } static assert(isPublicMember!(A, "bar")); static assert(!isPublicMember!(A, "foo")); static assert(!isPublicMember!(A, "baz"));
See Implementation