you can write a simple program like this, though it may not be the most optimized one (note that max_Limit can be 2,147,483,647 for int in c#, hence plan accordingly)
namespace Armstrong_Numbers
{
class Program
{
static void Main(string[] args)
{
int sum = 0;
int remainder_Number = 0;
int length=0;
int max_Limit = 9999;
Console.WriteLine("The List of Armstrong Number's are :-");
for (int number = 1; number <= max_Limit; number++)
{
length = sum = 0;
for (int counter = number; counter > 0; counter = counter / 10)
{
length++;
}
for (int counter = number; counter > 0; counter = counter / 10)
{
remainder_Number = counter % 10;
sum = sum + (int)Math.Pow(remainder_Number, length);
}
if (sum == number)
Console.WriteLine(number);
}
}
}
}