davetough
asked on
change C# console app to windows form
not school work-
can i turn this console C# program into a program using a windows form?
if possible- any first ideas as to how to go about it?
program asks for salaries-
then sums them up with array and a for loop-
i have a more complicated program to convert- but do not understand how to have for loop and array in a gui form
thank you
can i turn this console C# program into a program using a windows form?
if possible- any first ideas as to how to go about it?
program asks for salaries-
then sums them up with array and a for loop-
i have a more complicated program to convert- but do not understand how to have for loop and array in a gui form
thank you
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace test1
{
class Program
{
static void Main(string[] args)
{
int i;
int[] salary = new int[10];
int sumofsalary = 0;
for (i = 0;i <=4; i++)
{
Console.WriteLine("enter salary of Employee: {0}", i + 1);
salary[i] = Int32.Parse(Console.ReadLine());
}
for (i = 0; i <= 4; i++)
{
sumofsalary = sumofsalary + salary[1];
}
Console.WriteLine("total salary given to employees is = " + sumofsalary);
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
...or use multiple TextBoxes, one for each slot in the array.
...or use a DataGrid type control instead.