错误号18 [英] error number 18

查看:84
本文介绍了错误号18的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Assalamualaikum ...
我收到此错误.请帮助我.

< b>错误18运算符``+''不能应用于类型为``System.DateTime''和``int''的操作数</b>

Assalamualaikum...
i am getting this error.Kindly help me.

<b>Error 18 Operator ''+'' cannot be applied to operands of type ''System.DateTime'' and ''int''</b>

推荐答案

此错误意味着您不能简单地将一个整数添加到datetime对象.

根据您的整数含义,您可以使用
功能:

This error means you can''t simply add a integer to the datetime object.

Depending on what your integer means you can use the
functions:

DateTime now = DateTime.Now;
now.AddDays(1);
now.AddHours(2);
now.AddMilliseconds(3);
...


要将定义的值添加到日期时间对象


To add a defined value to your datetime object


这篇关于错误号18的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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