Click here to Skip to main content
15,923,389 members
Home / Discussions / C#
   

C#

 
GeneralRe: Get info from a listbox and pass to a method ? Pin
autekre25-Feb-06 22:15
autekre25-Feb-06 22:15 
GeneralRe: Get info from a listbox and pass to a method ? Pin
darkelv25-Feb-06 22:21
darkelv25-Feb-06 22:21 
GeneralRe: Get info from a listbox and pass to a method ? Pin
autekre27-Feb-06 0:27
autekre27-Feb-06 0:27 
QuestionEdit Mode in DataGridView control Pin
ak1234525-Feb-06 18:36
ak1234525-Feb-06 18:36 
QuestionNewbie: How do I code on more than one file? Pin
DNA Code this!25-Feb-06 18:04
DNA Code this!25-Feb-06 18:04 
AnswerRe: Newbie: How do I code on more than one file? Pin
Sean8925-Feb-06 18:08
Sean8925-Feb-06 18:08 
GeneralRe: Newbie: How do I code on more than one file? Pin
DNA Code this!25-Feb-06 18:13
DNA Code this!25-Feb-06 18:13 
GeneralRe: Newbie: How do I code on more than one file? Pin
Sean8925-Feb-06 18:27
Sean8925-Feb-06 18:27 
I'm not sure what errors your getting but here is an example of using a seperate file:
//Program.cs
using System;
using System.Collections.Generic;
using System.Text;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            SeperateFile.PrintMessage("Hi n' Stuff");
        }
    }
}

//SeperateFile.cs
using System;
using System.Collections.Generic;
using System.Text;

namespace ConsoleApplication1
{
    class SeperateFile
    {
        public static void PrintMessage(string message)
        {
            Console.WriteLine(message);
        }
    }
}


The example above assumes that the methods in your seperate file are static. If they are not you need to instantane the SeperateFile class:
//Program.cs
using System;
using System.Collections.Generic;
using System.Text;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            SeperateFile obj = new SeperateFile();
            obj.PrintMessage("Hi n' Stuff");
        }
    }
}


Does this help?

Wacky waving inflateable arm flailing tube man!
- Family Guy
AnswerRe: Newbie: How do I code on more than one file? Pin
DNA Code this!25-Feb-06 18:33
DNA Code this!25-Feb-06 18:33 
GeneralRe: Newbie: How do I code on more than one file? Pin
DNA Code this!25-Feb-06 18:38
DNA Code this!25-Feb-06 18:38 
QuestionHow can I do this?"open with" Pin
hackerhcm25-Feb-06 17:55
hackerhcm25-Feb-06 17:55 
AnswerRe: How can I do this?"open with" Pin
mav.northwind25-Feb-06 21:29
mav.northwind25-Feb-06 21:29 
GeneralRe: How can I do this?"open with" Pin
hackerhcm25-Feb-06 22:19
hackerhcm25-Feb-06 22:19 
QuestionPrints Error Pin
bc111825-Feb-06 13:22
bc111825-Feb-06 13:22 
Questionstatic methods Pin
spin vector25-Feb-06 11:39
spin vector25-Feb-06 11:39 
AnswerRe: static methods Pin
User 665825-Feb-06 11:56
User 665825-Feb-06 11:56 
GeneralRe: static methods Pin
Colin Angus Mackay25-Feb-06 12:28
Colin Angus Mackay25-Feb-06 12:28 
GeneralRe: static methods Pin
leppie25-Feb-06 19:44
leppie25-Feb-06 19:44 
Questioncorrect errors in xml Pin
SJ_Phoenix25-Feb-06 10:19
SJ_Phoenix25-Feb-06 10:19 
Questionhow can i find my real ip Pin
CursedXp25-Feb-06 9:54
CursedXp25-Feb-06 9:54 
AnswerRe: how can i find my real ip Pin
Guffa25-Feb-06 10:46
Guffa25-Feb-06 10:46 
AnswerRe: how can i find my real ip Pin
Luis Alonso Ramos25-Feb-06 18:01
Luis Alonso Ramos25-Feb-06 18:01 
AnswerRe: how can i find my real ip Pin
CursedXp26-Feb-06 3:40
CursedXp26-Feb-06 3:40 
QuestionNeed help with Multithreadding Pin
jakehn25-Feb-06 9:36
jakehn25-Feb-06 9:36 
AnswerRe: Need help with Multithreadding Pin
User 665825-Feb-06 9:43
User 665825-Feb-06 9:43 

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.