本文介绍了我想为停车的用户收取费用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在做项目停车系统,我想要计算总金额意味着如果用户停车10分钟我想要收取10Rs。请问任何人如何在c#中计算感谢......在事先
I'm doing project car parking system in that i want to calculate total amount means if the user parks car for 10 minutes i want to make charge of 10Rs. Please can anyone how to calculate in c# Thank...... In Advance
推荐答案
public double ActualParkingFee(DateTime checkIn, DateTime checkOut)
{
TimeSpan timeDiff = checkOut - checkIn;
double fee = timeDiff.TotalMinutes; // 1 RS / min, so no need for extra calculations
return fee;
}
这篇关于我想为停车的用户收取费用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!