Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

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
 
PREVIOUS NEXT
Tagged: #cast
ADD COMMENT
Topic
Name
2+1 =