@@ -1009,7 +1009,7 @@ private static BitArray PlainTextToBinaryNumeric(string plainText)
10091009 for ( int i = 0 ; i < plainText . Length - 2 ; i += 3 )
10101010 {
10111011 // Parse the next three characters as a decimal integer.
1012- #if NET5_0_OR_GREATER
1012+ #if NETCOREAPP2_1_OR_GREATER || NETSTANDARD2_1
10131013 var dec = int . Parse ( plainText . AsSpan ( i , 3 ) , NumberStyles . None , CultureInfo . InvariantCulture ) ;
10141014#else
10151015 var dec = int . Parse ( plainText . Substring ( i , 3 ) , NumberStyles . None , CultureInfo . InvariantCulture ) ;
@@ -1021,7 +1021,7 @@ private static BitArray PlainTextToBinaryNumeric(string plainText)
10211021 // Handle any remaining digits if the total number is not a multiple of three.
10221022 if ( plainText . Length % 3 == 2 ) // Two remaining digits are encoded in 7 bits.
10231023 {
1024- #if NET5_0_OR_GREATER
1024+ #if NETCOREAPP2_1_OR_GREATER || NETSTANDARD2_1
10251025 var dec = int . Parse ( plainText . AsSpan ( plainText . Length / 3 * 3 , 2 ) , NumberStyles . None , CultureInfo . InvariantCulture ) ;
10261026#else
10271027 var dec = int . Parse ( plainText . Substring ( plainText . Length / 3 * 3 , 2 ) , NumberStyles . None , CultureInfo . InvariantCulture ) ;
@@ -1030,7 +1030,7 @@ private static BitArray PlainTextToBinaryNumeric(string plainText)
10301030 }
10311031 else if ( plainText . Length % 3 == 1 ) // One remaining digit is encoded in 4 bits.
10321032 {
1033- #if NET5_0_OR_GREATER
1033+ #if NETCOREAPP2_1_OR_GREATER || NETSTANDARD2_1
10341034 var dec = int . Parse ( plainText . AsSpan ( plainText . Length / 3 * 3 , 1 ) , NumberStyles . None , CultureInfo . InvariantCulture ) ;
10351035#else
10361036 var dec = int . Parse ( plainText . Substring ( plainText . Length / 3 * 3 , 1 ) , NumberStyles . None , CultureInfo . InvariantCulture ) ;
0 commit comments