Whats the difference between () and <> when getting a node in C#

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Daxos

When you want to get a certain node you can use both () and <>, I can’t understand what’s the difference, I looked for an answer but couldn’t find anything.

var playerStats = (PlayerStats)GetNode("/root/PlayerStats");
var playerStats = GetNode<PlayerStats>("/root/PlayerStats");

Both of those work, but which one I should use?

:bust_in_silhouette: Reply From: juppi

It’s well explained in the docs:
https://docs.godotengine.org/en/stable/getting_started/scripting/c_sharp/c_sharp_features.html