Click here to Skip to main content
15,899,679 members
Home / Discussions / C#
   

C#

 
QuestionOdbcDataReader Pin
viliam18-Oct-09 21:22
viliam18-Oct-09 21:22 
AnswerRe: OdbcDataReader Pin
OriginalGriff18-Oct-09 22:24
mveOriginalGriff18-Oct-09 22:24 
GeneralRe: OdbcDataReader Pin
viliam19-Oct-09 4:05
viliam19-Oct-09 4:05 
QuestionLoading a form.... Pin
Dawit Kiros18-Oct-09 19:58
Dawit Kiros18-Oct-09 19:58 
AnswerRe: Loading a form.... Pin
Christian Graus18-Oct-09 20:01
protectorChristian Graus18-Oct-09 20:01 
AnswerRe: Loading a form.... Pin
Md. Marufuzzaman18-Oct-09 23:04
professionalMd. Marufuzzaman18-Oct-09 23:04 
QuestionAlter the size of the Crystal Reports which displays more than 10 fields horizontally in it ? Pin
Subin Alex18-Oct-09 18:39
Subin Alex18-Oct-09 18:39 
QuestionProblem with "Cannot implicitly convert type "string" to "int" While using 2 buttons on Windows form application Pin
WhiteWolf1918-Oct-09 17:19
WhiteWolf1918-Oct-09 17:19 
hi! im having problems with a code im working on a Windows Form Application
I will post the code I have so far:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Trabajo_de_Programacion1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}


private void button1_Click(object sender, EventArgs e)
{

string nombre;
int intentos;
intentos = 0;
nombre = textBox1.Text;
label8.Text = "Hola," + nombre + " !";
switch (comboBox1.SelectedIndex)
{
case 0:
{ intentos = 10; }
break;
case 1:
{ intentos = 8; }
break;
case 2:
{ intentos = 5; }
break;
case 3:
{ intentos = 3; }
break;
}
label9.Text = "Numero de intentos restantes: " + intentos;

Random randNum1 = new Random();
randNum1.Next();
label10.Text = "" + (randNum1.Next(4));

randNum1.Next();
label11.Text = "" + (randNum1.Next(4));

randNum1.Next();
label12.Text = "" + (randNum1.Next(4));

randNum1.Next();
label13.Text = "" + (randNum1.Next(4));





}

private void button2_Click(object sender, EventArgs e)
{
int intentosrestantes, intentos, ;
intentos = label9.Text; intentosrestantes = (intentos - 1);
label9.Text = "" + intentosrestantes;



}


}
}

The error I get is on the label9.Text and it says :Cannot implicitly convert type "string" to "int"
Thanks for the help! Smile | :)
AnswerRe: Problem with "Cannot implicitly convert type "string" to "int" While using 2 buttons on Windows form application Pin
N a v a n e e t h18-Oct-09 17:27
N a v a n e e t h18-Oct-09 17:27 
GeneralRe: Problem with "Cannot implicitly convert type "string" to "int" While using 2 buttons on Windows form application Pin
WhiteWolf1918-Oct-09 17:34
WhiteWolf1918-Oct-09 17:34 
GeneralRe: Problem with "Cannot implicitly convert type "string" to "int" While using 2 buttons on Windows form application Pin
N a v a n e e t h18-Oct-09 18:02
N a v a n e e t h18-Oct-09 18:02 
GeneralRe: Problem with "Cannot implicitly convert type "string" to "int" While using 2 buttons on Windows form application Pin
WhiteWolf1918-Oct-09 18:04
WhiteWolf1918-Oct-09 18:04 
GeneralRe: Problem with "Cannot implicitly convert type "string" to "int" While using 2 buttons on Windows form application Pin
Luc Pattyn18-Oct-09 18:06
sitebuilderLuc Pattyn18-Oct-09 18:06 
GeneralRe: Problem with "Cannot implicitly convert type "string" to "int" While using 2 buttons on Windows form application Pin
N a v a n e e t h18-Oct-09 18:18
N a v a n e e t h18-Oct-09 18:18 
AnswerRe: Problem with "Cannot implicitly convert type "string" to "int" While using 2 buttons on Windows form application Pin
AhmedMasum19-Oct-09 0:44
AhmedMasum19-Oct-09 0:44 
QuestionWeb site Ripper (Copier) in C# Pin
fireblade8018-Oct-09 13:56
fireblade8018-Oct-09 13:56 
AnswerRe: Web site Ripper (Copier) in C# Pin
Christian Graus18-Oct-09 14:06
protectorChristian Graus18-Oct-09 14:06 
AnswerRe: Web site Ripper (Copier) in C# Pin
N a v a n e e t h18-Oct-09 17:08
N a v a n e e t h18-Oct-09 17:08 
GeneralRe: Web site Ripper (Copier) in C# Pin
Luc Pattyn18-Oct-09 18:11
sitebuilderLuc Pattyn18-Oct-09 18:11 
GeneralRe: Web site Ripper (Copier) in C# Pin
N a v a n e e t h18-Oct-09 18:20
N a v a n e e t h18-Oct-09 18:20 
QuestionCannot set listview colum data correctly Pin
c#coder200918-Oct-09 13:34
c#coder200918-Oct-09 13:34 
AnswerRe: Cannot set listview colum data correctly Pin
N a v a n e e t h18-Oct-09 17:25
N a v a n e e t h18-Oct-09 17:25 
GeneralRe: Cannot set listview colum data correctly Pin
c#coder200918-Oct-09 18:06
c#coder200918-Oct-09 18:06 
GeneralRe: Cannot set listview colum data correctly Pin
N a v a n e e t h18-Oct-09 18:11
N a v a n e e t h18-Oct-09 18:11 
GeneralRe: Cannot set listview colum data correctly [modified] Pin
c#coder200918-Oct-09 18:25
c#coder200918-Oct-09 18:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.