Does C# allow omitting class parameter inside its methods?
<p>While I was cleaning the code for my project, I stumbled upon a method within the class like following (simplified)</p>

<pre><code>public static class HelperClass
{
   public static void DoStuff(this DifferentClassName obj)
}
</code></pre>

<p>After performing a quick search, aside from definition, the search result gave me the following:</p>

<pre><code>varname.DoStuff();
</code></pre>

<p>Obviously, I thought that it didn't have anything to do with the method in the class, so I commented out the class method so see if it would cause any errors. To my surprise, the line from search result was redded-out. </p>

<p>The snippet of the search result line is as following:</p>

<pre><code>var varname = new DifferentClassName()
{
    //stuff inside
}

varname.DoStuff(); //&lt;==what about parameter??
</code></pre>

<p>I initially thought that it was because a new instance of class created, but shouldn't it still be a parameter inside the line in question? Can anyone please explain why these methods are tied to each other, while the parameter inside the method call was omitted?</p>