Win C#应用程序中的一系列数字验证 [英] Series of Numbers Validation in Win C# application

查看:59
本文介绍了Win C#应用程序中的一系列数字验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我有一个数字序列,我需要验证该序列,以便它不能考虑序列之间的数字.例如,如果我再次有10到20个gridview列,格式为10-20,如果再次我将网格添加为15-20或5到25或11到15则不必考虑..

例如

10-20
25-30
40-60
100-150

如果需要在网格中再添加一条记录,则不应考虑10-20或28-30或45-55

Hi

I have a series of number i need to validate the series such that it must can''t consider number inbetween series.. for eg i have 10 to 20 numbers in of the coloum of gridview in the format of 10-20 if again if i add to grid as 15-20 or 5 to 25 or 11 to 15 it must not consider..

for example
Column
10-20
25-30
40-60
100-150

If I need to add one more record to the grid it should not consider 10-20 or 28-30 or 45-55

推荐答案

您可以编写gridview扩展方法,用于检查所讨论的列中的第一个可用值.有很多方法可以实现这种方法.
You can write a gridview extension method that checks the column in question for the first available value. There are a lot of ways to implement such a method.


这篇关于Win C#应用程序中的一系列数字验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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