error CS0119: 'GameObject.GetComponent<T>()' is a method, which is not valid in the given context code example
Example: error CS0119: 'GameObject.GetComponent()' is a method, which is not valid in the given context
use after the <...> "()" and then it will work