I have a method that checks if a certain document is of a certain type and chooses to do something about it :
private void OpenOrActivateDocument(Type FormType)
{ var doc = dmMain.View.Documents.
Where(x => x.Form is FormType).
Select(x=>x).First();
// do something about the found (or not found) doc
}
this is a sample method that calls the above method:
private void button1_click(Object sender, EventArgs e)
{
OpenOrActivateDocument(typeof(BudgetExtractionWindow));
}
however, I get an error here : "Where(x => x.Form is FormType)". If I were to change this to a specific type (that is not passed via the parameters), then i would not have a problem.