Type the next higher prime following the number entered in the console. in c#

This has many many prior discussions about prime number generation. You tagged this with c and visual-basic-6 so you must have a better idea of what you code in today. I wrote in VB6 for years and because of its limitations I'll guess you won't use that old system.
But hey, you can look at the following code base and modify it to your needs.
Read https://rosettacode.org/wiki/Sequence_of_primes_by_trial_division

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.