c# - How to check the missing element in the sequence -
I am doing a project related to payroll where for each I will have some Let's say that when I bind to a grid Now if I select 1 from the grid and click when I delete, I'll tell you an error message, you must first delete the maximum payment period. Similarly, if my maximum salary is in the form of the period number I am using As if max Number and I would like to display an error message if I select If I select something like this: payperiodnumbers Has been run.
7 and if the user chooses
1,2,3,4, 5,6 And try to delete I would like to display the same error. I am saving the selected
id of in an એરલલિસ્ટ so that someone can help me how I can check my status as I can get the maximum paydaydays using the query But I want to do the rest of the code.
2.0 , so there is no point in using
LINQ here. Anyone can help me
Azodious told me that I am showing a situation that should work and nothing
1,5,7 .
5,6,7 it should be deleted.
selectedNumbers.Sort (); SelectedNumbers.Reverse (); Int maxPeriodNumber = 5; // This is the full last address you have = (int) the selected number [0]; If the (final value & lt; maxPeriodNumber) {// highest number selected is smaller than necessary, warn the user or remove the exception return; } Foreach (int value in selected digits) {if (val> (final value-1)) // // numbering is a difference, warn the user or remove the exception return; } LastValue = val; } // When you end here, everything is fine and you can delete items whose number is in the list
Comments
Post a Comment