[Vala] Extension Methods



Hi,
is there any feature like extension methods from c# 3.0 in vala supported.
It would be a cool feature in vala and could allow to write better code.
namespace ExtensionMethods
{
public static class MyExtensions
{
public static int WordCount(this String str)
{
return str.Split(new char[] { ' ', '.', '?' }, StringSplitOptions.RemoveEmptyEntries).Length;
}
}
}
(see http://msdn.microsoft.com/en-us/library/bb383977.aspx)

thanks,
regards
uwe


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]