File tree Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Original file line number Diff line number Diff line change 5353 <Compile Include =" CommonClasses\DoublyNode.cs" />
5454 <Compile Include =" CommonClasses\Exception.cs" />
5555 <Compile Include =" CommonClasses\TreeNodePrinter.cs" />
56+ <Compile Include =" Extensions\IntExtensions.cs" />
5657 <Compile Include =" Extensions\StringBuilderExtensions.cs" />
5758 <Compile Include =" LZ78Algm\LZ78Algm.cs" />
5859 <Compile Include =" LZ78Algm\LZ78CodeBlock.cs" />
Original file line number Diff line number Diff line change 1+ namespace AlgorithmsLibrary . IntExtensions
2+ {
3+ public static class IntExtensions
4+ {
5+ public static bool InRange ( this int @this , int left , int right )
6+ {
7+ if ( @this >= left && @this <= right )
8+ return true ;
9+ return false ;
10+ }
11+ public static bool InRange ( this decimal @this , decimal left , decimal right )
12+ {
13+ if ( @this >= left && @this <= right )
14+ return true ;
15+ return false ;
16+ }
17+ public static bool InRange ( this double @this , double left , double right )
18+ {
19+ if ( @this >= left && @this <= right )
20+ return true ;
21+ return false ;
22+ }
23+ public static bool InRange ( this long @this , long left , long right )
24+ {
25+ if ( @this >= left && @this <= right )
26+ return true ;
27+ return false ;
28+ }
29+ }
30+ }
You can’t perform that action at this time.
0 commit comments