Can you check this
lastColumnIdrownumber = dt_input.AsEnumerable().ToList().FindIndex(Function(x) String.IsNullOrWhiteSpace(x("ID").ToString())).ToString
lastrowNamenumber = dt_input.AsEnumerable().ToList().FindIndex(Function(x) String.IsNullOrWhiteSpace(x("Name").ToString())).ToString
Hope this helps!