Ways to invoke methods on CLR datatypes I have difficulty understanding when to use .method() and when to use ::method() in SQL Server.

For example


For HierarchyID data type 
I have seen HierarchyID::GetRoot(), but also @sample_node.GetAncestor(1);
For Geometry data type,
There is GEOMETRY::parse() that is used to insert rows. But there is also methods such as @sample_geometry.ToString() to output data with better readability.


What are the differences between them?
The difference is between CLR static methods (type_name::method()) and instance methods (instance.method())

Static methods are defined on the type itself and are generally utility methods that get everything they need to operate passed in as method parameters. 

Instance methods operate on an object of a particular datatype and are able to access the private state of that object and mutate the object or return a result that uses that state.

HierarchyID::GetRoot() always returns the same result.

@sample_node.GetAncestor(1); will return a different result dependent On what @sample_node is.