Search results for query: *

  • Users: Rabi
  • Order by date
  1. R

    Question Sum many numbers with condition

    the variable a must be int a =1. because it will not print the variable, only will take it as a value in the loop in the first.
  2. R

    Question Sum many numbers with condition

    this code will enter numbers and print sum them between 1 to 10 // the problem is : it sum all the nummbers except the first number i entered example : if I enter 5 3 2 1 will print sum(3+2+1) = 6. will not sum 5 with numbers int a = int.Parse(Console.ReadLine()); int sum = 0; while (a < 10 &&...
  3. R

    Question Loop with multiplication numbers

    this code to multiplication numbers fro 6 to 1 like this : 6*5*4*3*2*1 = 720 the problem is the result is : 0 int sum = 0; int n = 6; for (int x = n; x > 0; x--) { sum *= x; } textBox2.Text =...
  4. R

    Question Using loop to sum numbers

    This code to sum numbers, but it is only show the numbers. mean instead of sum : 1 2 3 4 = 10 . its only show the numbers. how to sum the numbers? for (int x = 0; x < 5; x++) { int sum = 0; Console.WriteLine(sum += x)...
  5. R

    How to combine tow condition with if

    Is this code possible : If ( (age > 10 && tall > 170) || ( wight > 60)) { Consol....this is true }
  6. R

    How to combine tow condition with if

    I tried this but does not work. if ( age > 32 && tall >> 170) { Console..."Yes" } How to combine these tow condition : age and tall?
  7. R

    Question Make the app Excel in fronrt of Program.

    I did not find this SetWindowPos
  8. R

    Question Make the app Excel in fronrt of Program.

    After I export data from dataGridView to Excel. I want alway make the app of excel in front of the program.
  9. R

    Question Clear content of cells in Excel after export from DGV

    There is no 'Delete' method
  10. R

    Question Clear content of cells in Excel after export from DGV

    I tried this line to clear all the data in column 'd' of worksheet in excel after export the data from DGV. Is there a professional way instead of this way ?because I limited the cells in columns by 5000 Worksheet.get_range("d1","d5000").Cells.Clear();
  11. R

    Resolved Problem with creat Excel worksheet using C#

    worksheet = (Microsoft.Office.Interop.Excel.Worksheet)workbook.Worksheets.get_Item (1);
  12. R

    Resolved Problem with creat Excel worksheet using C#

    I am trying to creat code for export data from DGV to Excel . And i faced a problem in creating worksheet. Microsoft.Office.Interop.Excel._Application app = new Microsoft.Office.Interop.Excel.Application(); Microsoft.Office.Interop.Excel._Workbook workbook = app.Workbooks.Add(Type.Missing)...
  13. R

    Resolved Call tool from another Class

    I tried this way to call from class to another class. I creat class1 and do this in thus class using system.windows.Forms; public void mesb() { MessageBox.Show("ok"); } Then write this in Form1 load Class1 clas = new Class1 clas.mesb(); But it showed me this error under clas : A new expression...
  14. R

    Resolved Call tool from another Class

    I creat Form1 and put Tools on it like TextBox. I want to call this TextBox1 from another class. In the VB i used this way : class Form1.TextBox1
  15. R

    Resolved Using Cell 7n C# with value like in Vb

    I was using vb and i try to convert my code to C#. I tried this codes VB DataGridView1.CurrentRow.Cells(3).Value C# dataGridView1.CurrentRow.Cells... did not complete the code like VB with index number with cell. How can I do this
Back
Top Bottom