Will a for loop or foreach loop throw an exception in C# if the DataTable is null or contains no rows?
In C#, when working with a DataTable, you won’t get an exception from a for loop or foreach loop if the DataTable itself is not null but has no rows. However, if the DataTable is null, then trying to loop through it will throw a NullReferenceExceptio...
aamasum.hashnode.dev3 min read