Click here to Skip to main content
15,895,283 members
Home / Discussions / C#
   

C#

 
AnswerRe: .Net COM interop challenge Pin
Jason McBurney5-May-08 8:57
Jason McBurney5-May-08 8:57 
Questionpinvoke to send text in a console app Pin
jpeternel2-May-08 7:30
jpeternel2-May-08 7:30 
AnswerRe: pinvoke to send text in a console app Pin
jpeternel2-May-08 7:30
jpeternel2-May-08 7:30 
AnswerRe: pinvoke to send text in a console app Pin
jpeternel2-May-08 7:47
jpeternel2-May-08 7:47 
AnswerRe: pinvoke to send text in a console app Pin
Adeel Chaudhry2-May-08 11:16
Adeel Chaudhry2-May-08 11:16 
AnswerRe: pinvoke to send text in a console app Pin
Christian Graus2-May-08 12:54
protectorChristian Graus2-May-08 12:54 
GeneralRe: pinvoke to send text in a console app Pin
jpeternel16-May-08 11:54
jpeternel16-May-08 11:54 
QuestionPassing struct data from 1 form to another form Pin
Jerry Graham2-May-08 6:45
Jerry Graham2-May-08 6:45 
I have two forms, Form1 and Form2. I am trying to pass struct data from Form1 to Form 2 and each time, I get these errors:

C:\WINXP\Profiles\Owner\My Documents\Visual Studio 2005\Projects\Object\Object\Form1.cs(29,25): error CS1502: The best overloaded method match for 'Object.Form2.Form2(Object.Form2.client)' has some invalid arguments

C:\WINXP\Profiles\Owner\My Documents\Visual Studio 2005\Projects\Object\Object\Form1.cs(29,35): error CS1503: Argument '1': cannot convert from 'Object.Form1.client' to 'Object.Form2.client'

My Form1.cs is:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace Object
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
public struct client
{


public string ClientMatter;
public string ClientName;

}
private void button1_Click(object sender, EventArgs e)
{
client mary;
mary.ClientName = "mary";
Form2 frm = new Form2(mary);
frm.Show();
}
}
}

My Form2 code is:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace Object
{
public partial class Form2 : Form
{
public struct client
{


public string ClientMatter;
public string ClientName;

}

public Form2(client mary)
{
InitializeComponent();
label1.Text = mary.ClientName;

}

private void Form2_Load(object sender, EventArgs e)
{

}
}
}
AnswerRe: Passing struct data from 1 form to another form Pin
Colin Angus Mackay2-May-08 7:07
Colin Angus Mackay2-May-08 7:07 
AnswerRe: Passing struct data from 1 form to another form Pin
#realJSOP2-May-08 7:26
mve#realJSOP2-May-08 7:26 
QuestionCreating Reuseable Classes Pin
Jammer2-May-08 6:04
Jammer2-May-08 6:04 
AnswerRe: Creating Reuseable Classes Pin
carbon_golem2-May-08 6:37
carbon_golem2-May-08 6:37 
GeneralRe: Creating Reuseable Classes Pin
Jammer2-May-08 7:26
Jammer2-May-08 7:26 
AnswerRe: Creating Reuseable Classes Pin
Jason McBurney2-May-08 8:51
Jason McBurney2-May-08 8:51 
QuestionC# Classes in DLL files Pin
Cozmo232-May-08 5:49
Cozmo232-May-08 5:49 
AnswerRe: C# Classes in DLL files Pin
Judah Gabriel Himango2-May-08 6:30
sponsorJudah Gabriel Himango2-May-08 6:30 
AnswerRe: C# Classes in DLL files Pin
Abhijit Jana2-May-08 6:30
professionalAbhijit Jana2-May-08 6:30 
AnswerRe: C# Classes in DLL files Pin
#realJSOP2-May-08 6:30
mve#realJSOP2-May-08 6:30 
AnswerRe: C# Classes in DLL files Pin
Cozmo232-May-08 7:49
Cozmo232-May-08 7:49 
GeneralRe: C# Classes in DLL files Pin
Jason McBurney2-May-08 9:22
Jason McBurney2-May-08 9:22 
GeneralRe: C# Classes in DLL files Pin
Cozmo235-May-08 3:12
Cozmo235-May-08 3:12 
QuestionDateTime, DayOfWeek in range comparison Pin
buchstaben2-May-08 4:11
buchstaben2-May-08 4:11 
AnswerRe: DateTime, DayOfWeek in range comparison Pin
Urs Enzler2-May-08 4:22
Urs Enzler2-May-08 4:22 
GeneralRe: DateTime, DayOfWeek in range comparison Pin
buchstaben2-May-08 4:28
buchstaben2-May-08 4:28 
QuestionRe: DateTime, DayOfWeek in range comparison Pin
Spacix One2-May-08 4:54
Spacix One2-May-08 4:54 

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.