what do you prefer: extension methods or functions/static methods?
The first would be called
Code: Select all
aTarget := aSource:SubArray( nStart, nLength )
Code: Select all
aTarget := SubArray( aSource, nStart, nLength )
Moderator: wriedmann
Code: Select all
aTarget := aSource:SubArray( nStart, nLength )
Code: Select all
aTarget := SubArray( aSource, nStart, nLength )
Post by Karl-Heinz »
Code: Select all
nPos := aBuffer:IndexOfBytes( aPattern, nOffset )
Code: Select all
nPos := IndexOfBytes( aBuffer, aPattern, nOffset )
Post by MathiasHakansson »
No, I would not use them.Would you use the prefix name (discussed earlier) both for extension methods and functions?
we are in the .NET world, so I would use overloading (which is a great thing IMHO).VO used usuals if the same function could be used with different data types. In .net you have the option to use overloading instead.
Thank you for your comment!In .net if feels more natural to use extension methods.
Post by Guy Deprez »