在ASP.net C#中我如何编写Math.floor()语句 [英] In ASP.net C# how do I write a Math.floor() statement

查看:168
本文介绍了在ASP.net C#中我如何编写Math.floor()语句的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在ASP.net C#中如何在JavaScript中编写Math.floor()语句或在VB.net中编写Int()语句。



函数需要一个数字并删除小数:



Math.floor(123.456)= 123

Int(456.789)= 456



如何在C#中执行此操作?

解决方案

在C#中:

< pre lang =c#> Math.Floor( 123 456



在VB.NET中:

 Math.Floor( 123  456 



在JavaScript中:

 数学 .floor( 123  456 


你需要为该函数提供十进制数

Math.Floor(123.456)


In ASP.net C# how do I write a Math.floor() statement in JavaScript or a Int() statement in VB.net.

A function that takes a number and deletes the decimals:

Math.floor(123.456) = 123
Int(456.789) = 456

How do I do this in C#?

解决方案

In C#:

Math.Floor(123.456)


In VB.NET:

Math.Floor(123.456)


In JavaScript:

Math.floor(123.456)


you need to provide decimal number to that function

Math.Floor(123.456)


这篇关于在ASP.net C#中我如何编写Math.floor()语句的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆