Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static class SQLSelectExtensions
- {
- public static IEnumerable<T> Records<T>(this SQLSelect select)
- {
- int counter = 1;
- int size = select.GetCount();
- using(UnmanagedStruct<T> record = new UnmanagedStruct<T>())
- {
- while (counter <= size)
- {
- if (select.GetNth(record.Handle, counter) == 0)
- {
- counter++;
- yield return record.Data;
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment