Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Code with generic types
Message
De
09/11/2008 07:24:36
 
Information générale
Forum:
Level Extreme
Catégorie:
Autre
Titre:
Code with generic types
Divers
Thread ID:
01360734
Message ID:
01360734
Vues:
22
Michel,

Is there anything that can be done to allow LessThan + CharExpression + GreaterThan in code fragments

This 'eats' part of the code in preview mode. Problem is you just don't know how it will look like
class xxx<T> where T : IComparable<T>
{
 
}
public static partial class ExtensionMethods
{
        public static bool InList<T>(this T s, params T[] list) where T : IEquatable<T>
		{
			return list.Contains(s);
		}
}
If I use « and » instead of LT and GT you see what I mean but I have to manually edit the code
class xxx«T» where T : IComparable«T»
{
 
}
public static partial class ExtensionMethods
{
        public static bool InList«T»(this T s, params T[] list) where T : IEquatable«T»
		{
			return list.Contains(s);
		}
}
thanks,
Gregory
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform