The binary multiplication assignment operator.
The * operator is predefined for numeric types to do mathmatical multiplication. The *= operator can't be overloaded directly, but user-defined types can overload the * operator
//C# *= Math Operator | |
//www.amiedd.com | |
using System; | |
class MathClass | |
{ | |
static void Main() | |
{ | |
int a = 10; | |
a *= 6; | |
Console.WriteLine(a); | |
} | |
} |
August 11, 2024