How to find length of array without using builtin functions in C#?
Loading
How to find length of array without using builtin functions in C#?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Rajesh GamiPosted Jul 26, 2022, 9:54 AM
Hello Daanish
If you want to find array length without using any in-build function then you can use foreach loop and get total count of loop.
Tchokomeni LeoPosted Jul 12, 2022, 5:48 PM
You can use a list to get the number of item in your array.here is an example:
Listproject = new List(); foreach(var item in YourArray) { project.Add(item); } Console.WriteLine("Array length is {0}",project.Count);
Sachin SinghPosted Jul 10, 2022, 6:40 PM
Uttam KumarPosted Jul 10, 2022, 4:18 PM
Rajanikant HawaldarPosted Jul 10, 2022, 11:09 AM