C#

C#

Made by DeepSource

GetType() called on System.Type CS-W1064

Bug risk
Critical

The GetType() method returns a System.Type object that represents an entity's type. Calling this method on System.Type does not make any sense, is redundant, and is likely a mistake. It is recommended that you take another look at it.

Bad Practice

var tpe = someObj.GetType();
var entityTpe = tpe.GetType();

Recommended

var entityTpe = someObj.GetType();

Reference