All pastes #1494488 Raw Edit

Mine

public text v1 · immutable
#1494488 ·published 2009-07-14 09:05 UTC
rendered paste body
public static int ComputeChecksum( string value )
{
    IEnumerable<char> digits = value.ToCharArray().Where( c => Char.IsDigit( c ) );
    return digits.Select( ( c, i ) =>
        (i%2 == 0) ? ((c - '0') * 2 ) : (c - '0') ).Sum()%10;
}