using (Font font3 = new Font("Arial", 10.0f),
font4 = new Font("Arial", 10.0f))
{
// Use font3 and font4.
}
I know that multiple objects of same type can be used inside a using clause.
Cant i use different types of objects inside the using clause?
Well i tried but although they were different names and different objects, they acted the same = had the same set of methods
Is there any other way to use the using class with different types?
If not, what is the most appropriate way to use it?
Like so?