I'm about to call it a night here (03:00 at GMT+7), but I'd like to help you get started on this while it's fresh in mind. Please respond to the issues raised in my comment on your question.
First, if you really need to locate every MaskedTextBox in your Form, or other Container of Controls, no matter how deeply nested the level of encapsulation may be, you need to use recursion.
Here's one example of many ways you could do this; for simplicity, I won't use Linq here, and I'll use standard-flavor recursion rather than use a Stack:
private readonly Type dateTimeType = typeof(DateTime);
private List<MaskedTextbox> allMaskedTextBoxes = new List<MaskedTextbox>();
private void SetMaskTBValType(Control.ControlCollection cCollection)
{
foreach (Control c in cCollection)
{
if (c is MaskedTextBox)
{
var toMaskType = c as MaskedTextBox;
toMaskType.ValidatingType = dateTimeType;
}
else
{
if (c.HasChildren)
{
SetMaskTBValType(c.Controls);
}
}
}
}
private void YourForm_Load(object sender, EventArgs e)
{
SetMaskTBValType(this.Controls);
bool test = maskedTextBox1.ValidatingType == dateTimeType;
}