LANGUAGE
Explicit numeric cast
Requests a numeric conversion. In-range fractional values cast to an integer truncate toward zero; overflow behavior depends on types and context.
Formal Syntax & Structure
csharp syntaxcsharp
(TargetType)valueWorking Example
Example Snippetcsharp
int count = (int)3.9; // 3