I have a method which returns class type in c#
<p>I'm new to programming and C# and i have this below question which i do not know what to call it as</p>

<p>I have a method as </p>

<pre><code>public Account GetAccountDetails(){ //where Account is a class

    return new Account{
        text = GetNameOfAccount;
        length = GetLengthOfAccountNumber;

    };
}//end of method 
</code></pre>

<p>I knew that i would be able to get the properties and fields from the above method and i can use it. But, what do you call the above method as some object initializers or anonymous type? How is it useful than explicitly defining an object for Account class and using the object for accessing the methods?</p>