C# Function that returns instantiated object

Hello,
I need kind of help…

Here I’m trying to make a function that will return instantiated object, and put it into variable.
here is the code sample;

   public CLine CreateLine(Vector3 LinePos, CLine LinePrefab)
{
	CLine NewLineScript;
	NewLineScript =  Instantiate(LinePrefab, LinePos, Quaternion.identity) as CLine;
	Return (NewLineScript);
}

  CLine LineScript;
  LineScript = CreateLine(LinePos,LinePrefab);

The question is ,

Does the function returns instantiated object or the pointer to him?

In C#/.NET, any variable that “contains” an object instance in reality contains a reference to the object instance. When passing the variable around (either as a parameter, or returning it from a function) you’re passing around the reference, not the object data itself.

This is completely transparent to you as a developer - it has no affect on the syntax you use to access the object. So the question is, why does this matter to you? It’s rare that it should.