Why some methods in C# return narrow data types when a wider data type would make more sense?
<p>I consider myself as a good mid-level .Net developer, and I’ve gotten a decent understanding of all concepts and terminologies in C# after having worked on it for the last 3+ years. However, there’s this one question I have and I apologize if it looks like a dumb and silly question. What I want to know is why some methods in the Framework Class Library return narrow data types when a wider data type would make more sense, and we have to later cast it to the data type we are interested in. I would like to give the following two examples to support my question:</p>

<ol>
<li><p><code>Label Label1 = (Label)Grid.FindControl("Label1");</code><br>
In this example, why is FindControl returning an instance of Control type, and we have to cast it to a Label type. It could have returned an instance of Label type since we are passing a valid ID declared in the markup in the method argument.</p></li>
<li><p><code>protected override object SaveViewState()</code><br>
In this example, on object is returned which we have to cast to may be a string type.</p></li>
</ol>

<p>I’m sorry once again if my question is confusing. All I want to know is why such scenarios are returning wider types when they could have returned narrow types and it could avoid us an additional step of casting to the type we want.</p>
