Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Niggling icon
Message
De
12/03/2011 11:30:03
 
 
À
12/03/2011 10:12:25
Information générale
Forum:
ASP.NET
Catégorie:
Visual Studio
Titre:
Versions des environnements
Environment:
C# 4.0
Divers
Thread ID:
01503462
Message ID:
01503478
Vues:
37
>Best practice is one class per file.
I'm not convinced of that but ....

>Any reason you can't do that?
I could. I could also just put the DTClass first - that would also avoid the error if it was opened in the designer.
But I'd still have the wrong icon.....


>
>>Hi,
>>
>>Never noticed this before but say I create a .cs file with just this:
class SomeClass {}
>>class DTClass : System.Data.DataTable { }
The presence of the DataTable derived class (even though it is not the first in the file) causes VS to show this in Solution Explorer with the 'Component' icon' rather than the expected 'C#'
>>
>>As an added annoyance it also includes the 'View Designer' option in the context menu and, of course, using this fails because the DTClass is not the first class in the file. Can't seem to find a way to avoid this behaviour - but at least it doesn't attempt to open the Designer view by default....
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform