Table of Contents

GR0035: Consider usage of typeof(x) instead of MethodBase.GetCurrentMethod().DeclaringType.

TitleConsider usage of typeof(x) instead of MethodBase.GetCurrentMethod().DeclaringType.
IdGR0035
CategoryMaintainability
Default SeverityWarning
Enabled By DefaultTrue
DescriptionMethodBase.GetCurrentMethod().DeclaringType may be a misuse of establishling type information. typeof(x) allows for compile time verification of the type and avoids reflection.
Custom Tags