Click here to Skip to main content
15,561,246 members
Home / Discussions / C#
   

C#

 
GeneralRe: Coding Moveable Elements for Games or Whatever Pin
Eddy Vluggen23-Jan-18 1:20
professionalEddy Vluggen23-Jan-18 1:20 
GeneralRe: Coding Moveable Elements for Games or Whatever Pin
Gerry Schmitz23-Jan-18 8:37
mveGerry Schmitz23-Jan-18 8:37 
QuestionHow to insert the XML file in SQL Server Pin
Jieha Lee19-Jan-18 5:23
Jieha Lee19-Jan-18 5:23 
AnswerRe: How to insert the XML file in SQL Server Pin
OriginalGriff19-Jan-18 5:58
mveOriginalGriff19-Jan-18 5:58 
AnswerRe: How to insert the XML file in SQL Server Pin
jschell20-Jan-18 6:54
jschell20-Jan-18 6:54 
GeneralRe: How to insert the XML file in SQL Server Pin
Laxmidhar tatwa technologies23-Jan-18 6:00
Laxmidhar tatwa technologies23-Jan-18 6:00 
GeneralRe: How to insert the XML file in SQL Server Pin
jschell27-Jan-18 6:09
jschell27-Jan-18 6:09 
QuestionCalling a Method from a Form event Pin
ormonds18-Jan-18 15:08
ormonds18-Jan-18 15:08 
Can someone please help a newbie with what I suspect is a simple error?
Program.cs:
using System.IO;

namespace CreateDT
{
    static class Program
    {
        static void Main()
        {
        Application.EnableVisualStyles();
        Application.SetCompatibleTextRenderingDefault(false);
        Application.Run(new Form1());
        }
        static void MyMethod (name1 string, name2 string)
        {
        // do some stuff with files using the names provided
        }
    }
}

Form1.cs:
using System;
// other using statements

namespace CreateDT
{
    public partial class Form1 : Form
    {
        //variable definitions..
        public Form1()
        {
             InitializeComponent();
        }
        private void DoItButton_Click(object sender, EventArgs e)
        {
        // set names of currentfile, TargetFile
        MyMethod(currentfile, TargetFile);
        }

Gives error "CS0103 The name 'MyMethod' does not exist in the current context." I've looked at lots of examples which all seem to be done this way. Obviously not, what am I missing?
AnswerRe: Calling a Method from a Form event Pin
Peter Vegter18-Jan-18 15:35
Peter Vegter18-Jan-18 15:35 
AnswerRe: Calling a Method from a Form event Pin
OriginalGriff18-Jan-18 21:07
mveOriginalGriff18-Jan-18 21:07 
AnswerRe: Calling a Method from a Form event Pin
ormonds19-Jan-18 18:00
ormonds19-Jan-18 18:00 
GeneralRe: Calling a Method from a Form event Pin
OriginalGriff19-Jan-18 21:34
mveOriginalGriff19-Jan-18 21:34 
QuestionWhy ControlAccessibleObject' does not contain a definition for: BUY,SELL Pin
Member 1228884018-Jan-18 9:18
Member 1228884018-Jan-18 9:18 
AnswerRe: Why ControlAccessibleObject' does not contain a definition for: BUY,SELL Pin
Richard MacCutchan18-Jan-18 22:10
mveRichard MacCutchan18-Jan-18 22:10 
GeneralRe: Why ControlAccessibleObject' does not contain a definition for: BUY,SELL Pin
Member 1228884019-Jan-18 8:44
Member 1228884019-Jan-18 8:44 
GeneralRe: Why ControlAccessibleObject' does not contain a definition for: BUY,SELL Pin
Richard MacCutchan19-Jan-18 9:01
mveRichard MacCutchan19-Jan-18 9:01 
GeneralRe: Why ControlAccessibleObject' does not contain a definition for: BUY,SELL Pin
Member 1228884019-Jan-18 12:30
Member 1228884019-Jan-18 12:30 
GeneralRe: Why ControlAccessibleObject' does not contain a definition for: BUY,SELL Pin
Pete O'Hanlon19-Jan-18 23:22
mvaPete O'Hanlon19-Jan-18 23:22 
GeneralRe: Why ControlAccessibleObject' does not contain a definition for: BUY,SELL Pin
Member 1228884020-Jan-18 7:59
Member 1228884020-Jan-18 7:59 
GeneralRe: Why ControlAccessibleObject' does not contain a definition for: BUY,SELL Pin
Pete O'Hanlon20-Jan-18 23:27
mvaPete O'Hanlon20-Jan-18 23:27 
QuestionProject Reference Installed Applications Pin
TheCoolTech18-Jan-18 6:32
TheCoolTech18-Jan-18 6:32 
AnswerRe: Project Reference Installed Applications Pin
OriginalGriff18-Jan-18 6:48
mveOriginalGriff18-Jan-18 6:48 
AnswerRe: Project Reference Installed Applications Pin
Richard MacCutchan18-Jan-18 7:40
mveRichard MacCutchan18-Jan-18 7:40 
QuestionCannot convert from ref decimal? to ref decimal Pin
Kevin Marois18-Jan-18 6:30
professionalKevin Marois18-Jan-18 6:30 
AnswerRe: Cannot convert from ref decimal? to ref decimal Pin
F-ES Sitecore18-Jan-18 7:12
professionalF-ES Sitecore18-Jan-18 7:12 

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.