Answers for "object.cast c#"

C#
0

how to make a cast in c#

// if we have:
float f = 12.0f;
// and we want to put the value of f into 
int x;
// we can cast f to int like this:
x = (int)f //(int) is the cast
Posted by: Guest on March-25-2021

C# Answers by Framework

Browse Popular Code Answers by Language