0
我在我的项目中使用了下面的代码。使用此FxCop警告CA1305发生。如何在UWP中使用string.Format(......)时清除FxCop警告?
string endtime = string.Format("{0:0000}{1:00}{2:00}T{3:00}{4:00}{5:00}", SchAppointment.EndTime.Year,
SchAppointment.EndTime.Month, SchAppointment.EndTime.Day,
SchAppointment.EndTime.TimeOfDay.Hours,
SchAppointment.EndTime.TimeOfDay.Minutes,
SchAppointment.EndTime.TimeOfDay.Seconds);
如何从我的项目中清除此警告? 在此先感谢。
请分享一个可以重现您的问题的[mcve]。什么是你的'SchAppointment.EndTime'?没有完整的样本,我们不知道为什么有警告。 – Scavenger