Click here to Skip to main content
15,887,746 members
Home / Discussions / C#
   

C#

 
QuestionWebServices Pin
Member 22364197-May-18 23:17
Member 22364197-May-18 23:17 
AnswerRe: WebServices Pin
Eddy Vluggen7-May-18 23:38
professionalEddy Vluggen7-May-18 23:38 
AnswerRe: WebServices Pin
OriginalGriff7-May-18 23:43
mveOriginalGriff7-May-18 23:43 
GeneralRe: WebServices Pin
Member 22364198-May-18 19:35
Member 22364198-May-18 19:35 
GeneralRe: WebServices Pin
Mycroft Holmes8-May-18 20:31
professionalMycroft Holmes8-May-18 20:31 
Questionc# Why can I not get this to work? Pin
tomas0007-May-18 1:21
tomas0007-May-18 1:21 
AnswerRe: c# Why can I not get this to work? Pin
Luc Pattyn7-May-18 2:42
sitebuilderLuc Pattyn7-May-18 2:42 
AnswerRe: c# Why can I not get this to work? Pin
User 74293389-May-18 23:24
professionalUser 74293389-May-18 23:24 
In OnSelected you have some syntax errors, but it looks like you intend to create a new Apath, set its Num1, and then use that in Form1. Currently however, Form1 creates a new Apath instead of using the one from Class1.
You could pass the item in the constructor like so.

Class1.cs
public void OnSelected(IGame selectedGame)
{
    var item = new Apath
    {
        Num1 = selectedGame.ApplicationPath
    };

    var form = new Form1(item);
    form.Show();
}


Form1.cs
namespace ClassLibrary1
{
    public partial class Form1 : Form
    {
        Class1.Apath apath1;

        public Form1(Class1.Apath item)
        {
            InitializeComponent();
            apath1 = item;
        }

        private void button1_Click(object sender, EventArgs e)
        {
            MessageBox.Show(apath1.Num1);
        }
    }
}


modified 13-Sep-18 21:01pm.

Questionnow how can i get the splitted values in a textbox from seperate line in c# using text file Pin
Mohamed Fahad M6-May-18 4:14
Mohamed Fahad M6-May-18 4:14 
AnswerRe: now how can i get the splitted values in a textbox from seperate line in c# using text file Pin
Gerry Schmitz6-May-18 5:02
mveGerry Schmitz6-May-18 5:02 
AnswerRe: now how can i get the splitted values in a textbox from seperate line in c# using text file Pin
OriginalGriff6-May-18 6:47
mveOriginalGriff6-May-18 6:47 
QuestionThe data contract type “…” cannot be deserialized because the required data members Pin
Ruhul Md Amin5-May-18 9:36
Ruhul Md Amin5-May-18 9:36 
AnswerRe: The data contract type “…” cannot be deserialized because the required data members Pin
OriginalGriff5-May-18 20:45
mveOriginalGriff5-May-18 20:45 
GeneralRe: The data contract type “…” cannot be deserialized because the required data members Pin
Ruhul Md Amin6-May-18 1:52
Ruhul Md Amin6-May-18 1:52 
Questionwhen have you used a C# SortedList<TKey, TValue> ? Pin
BillWoodruff5-May-18 7:44
professionalBillWoodruff5-May-18 7:44 
AnswerRe: when have you used a C# SortedList<TKey, TValue> ? Pin
Gerry Schmitz5-May-18 8:42
mveGerry Schmitz5-May-18 8:42 
GeneralRe: when have you used a C# SortedList<TKey, TValue> ? Pin
BillWoodruff5-May-18 23:21
professionalBillWoodruff5-May-18 23:21 
GeneralRe: when have you used a C# SortedList<TKey, TValue> ? Pin
Gerry Schmitz6-May-18 4:33
mveGerry Schmitz6-May-18 4:33 
GeneralRe: when have you used a C# SortedList<TKey, TValue> ? Pin
BillWoodruff6-May-18 6:55
professionalBillWoodruff6-May-18 6:55 
GeneralRe: when have you used a C# SortedList<TKey, TValue> ? Pin
Gerry Schmitz6-May-18 7:33
mveGerry Schmitz6-May-18 7:33 
GeneralRe: when have you used a C# SortedList<TKey, TValue> ? Pin
BillWoodruff6-May-18 23:23
professionalBillWoodruff6-May-18 23:23 
AnswerRe: when have you used a C# SortedList<TKey, TValue> ? Pin
jschell5-May-18 11:29
jschell5-May-18 11:29 
GeneralRe: when have you used a C# SortedList<TKey, TValue> ? Pin
BillWoodruff5-May-18 23:25
professionalBillWoodruff5-May-18 23:25 
GeneralRe: when have you used a C# SortedList<TKey, TValue> ? Pin
jschell12-May-18 9:22
jschell12-May-18 9:22 
GeneralInvalid column name 'NoteTotal' , how to fix it to this error in Sql server Pin
Member 105327485-May-18 7:33
Member 105327485-May-18 7:33 

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.