Knowledge baseExam Center
ENEnglish
Choose language13

CKTIS / C#

*: practical reference

*: practical reference: * multiplies numbers, dereferences a pointer in unary unsafe use, or invokes an overload.

Version: C# operator reference; verified against C# 14

Syntax

left * right
  • multiplies numbers, dereferences a pointer in unary unsafe use, or invokes an overload.

Choose a type with the required range and precision before using it.

Integer overflow follows checked context, while floating-point error accumulates.

Zero times infinity is NaN for floating point; decimal can throw OverflowException.

The complete program actually uses *; its exact expected stdout is 42.

Examples

using System;
using System.Linq;
using System.Threading.Tasks;

Console.WriteLine(6 * 7);

Result

42

The complete program actually uses `*`; its exact expected stdout is `42`.

Sources