Use this following code i hope you will find the solution of your problem.
Program:
using System;
class TriangleDollar
{
public static void Main()
{
int i,j,k;
string d="$";
for(i=1;i<=5;i++)
{
for(k=1;k<=i;k++)
Console.Write(" ");
for(j=5;j>=i;j--)
{
Console.Write ("$",+j); // Enter the space with a ''$'' sign
// This is another syntax of Console.Write method. Here the digit after the comma '',''signifies the position of the first character ''$'' on the output screen.
}
Console.Write("\n"); // then we go to the next line.
}
Console.ReadLine();
}
}