Squared

namespace Extensions
{
   public static class IntExtensions
   {
      public static int Squared(this int intToBeSquared)
      {
         return intToBeSquared * intToBeSquared;
      }
   }
}

Example:
int result = 5.Squared();

Description

Returns the squared value

Details

Double click on the code to select all.

 

;