检查编号是否按顺序 [英] Check if Number is in Sequence

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

问题描述



我在以\ r \ n分隔的字符串中找到了一组数字:

我的字符串内容看起来像这样:

1
2
3
5
4

我想检查数字是否按顺序排列,还检查内部是否缺少数字

谢谢
Chaegie



I have set of numbers found in a string separated by \r\n:

my string content looks like this:

1
2
3
5
4

I want to check if the number is in sequence and check also if there are missing numbers within

Thanks
Chaegie

推荐答案

看看解决方案
Have a look at at the solution here - you would need to convert the code into C#.
However, this should give you some ideas on how to achieve a solution to your problem.


这篇关于检查编号是否按顺序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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