Click here to Skip to main content
15,891,473 members
Home / Discussions / C#
   

C#

 
AnswerRe: Transparency, or alternative, in non-client area. Pin
leppie27-Nov-08 22:02
leppie27-Nov-08 22:02 
QuestionI do not undertand arraylist or list Pin
netJP12L27-Nov-08 8:24
netJP12L27-Nov-08 8:24 
AnswerRe: I do not undertand arraylist or list Pin
User 665827-Nov-08 9:08
User 665827-Nov-08 9:08 
GeneralRe: I do not undertand arraylist or list Pin
Luc Pattyn27-Nov-08 10:12
sitebuilderLuc Pattyn27-Nov-08 10:12 
Questionhow to use variable form other class? C# Pin
ping_jacob27-Nov-08 7:30
ping_jacob27-Nov-08 7:30 
AnswerRe: how to use variable form other class? C# [modified] Pin
Kristian Sixhøj27-Nov-08 7:40
Kristian Sixhøj27-Nov-08 7:40 
AnswerRe: how to use variable form other class? C# Pin
Christian Graus27-Nov-08 10:11
protectorChristian Graus27-Nov-08 10:11 
AnswerRe: how to use variable form other class? C# [modified] Pin
Pedram Behroozi27-Nov-08 10:14
Pedram Behroozi27-Nov-08 10:14 
Hi,
You need to create an instance from class A so you can use its public members.
In this case you should write:
public class A
{
    public string a = "aaa";
}

public class B
{
    A Ainstance = new A();
    if(Ainstance.a = "aaa") {}
    if (Ainstance.a == "aaa") { ;}
}


If variable a (or any member in your class) is static, you can use it from class B without creating an instance.
Just like:
public class A
{
    public static string a = "aaa";
}

class B
{
    if(A.a = "aaa") {}
    if(A.a == "aaa") { ;}
}


Hope can help Smile | :)

I died as a mineral and became a plant,
I died as plant and rose to animal,
I died as animal and I was Man.
Why should I fear? When was I less by dying?
-- Rumi[^]

My blog

modified on Thursday, November 27, 2008 4:22 PM

GeneralRe: how to use variable form other class? C# Pin
ping_jacob29-Nov-08 5:24
ping_jacob29-Nov-08 5:24 
GeneralRe: how to use variable form other class? C# Pin
Pedram Behroozi29-Nov-08 5:47
Pedram Behroozi29-Nov-08 5:47 
AnswerRe: how to use variable form other class? C# Pin
SelvaSR11-Dec-08 23:09
SelvaSR11-Dec-08 23:09 
QuestionHow to learn C# & .NET framework when I know C++ Pin
just.an.imbecile227-Nov-08 5:34
just.an.imbecile227-Nov-08 5:34 
AnswerRe: How to learn C# & .NET framework when I know C++ Pin
EliottA27-Nov-08 5:43
EliottA27-Nov-08 5:43 
AnswerRe: How to learn C# & .NET framework when I know C++ Pin
Thomas Weller27-Nov-08 5:51
Thomas Weller27-Nov-08 5:51 
JokeRe: How to learn C# & .NET framework when I know C++ Pin
Tom Deketelaere27-Nov-08 21:54
professionalTom Deketelaere27-Nov-08 21:54 
GeneralRe: How to learn C# & .NET framework when I know C++ Pin
Thomas Weller27-Nov-08 22:14
Thomas Weller27-Nov-08 22:14 
JokeRe: How to learn C# & .NET framework when I know C++ Pin
Tom Deketelaere27-Nov-08 22:25
professionalTom Deketelaere27-Nov-08 22:25 
GeneralRe: How to learn C# & .NET framework when I know C++ Pin
Thomas Weller27-Nov-08 22:36
Thomas Weller27-Nov-08 22:36 
AnswerRe: How to learn C# & .NET framework when I know C++ Pin
Simon P Stevens27-Nov-08 5:58
Simon P Stevens27-Nov-08 5:58 
GeneralRe: How to learn C# & .NET framework when I know C++ Pin
just.an.imbecile227-Nov-08 6:05
just.an.imbecile227-Nov-08 6:05 
AnswerRe: How to learn C# & .NET framework when I know C++ Pin
Paul Conrad27-Nov-08 5:59
professionalPaul Conrad27-Nov-08 5:59 
GeneralRe: How to learn C# & .NET framework when I know C++ Pin
EliottA27-Nov-08 6:00
EliottA27-Nov-08 6:00 
GeneralRe: How to learn C# & .NET framework when I know C++ Pin
Paul Conrad27-Nov-08 6:07
professionalPaul Conrad27-Nov-08 6:07 
AnswerRe: How to learn C# & .NET framework when I know C++ Pin
Gary Stafford27-Nov-08 10:08
Gary Stafford27-Nov-08 10:08 
QuestionWebService to Webservice 2 Pin
BASONJS27-Nov-08 4:51
BASONJS27-Nov-08 4:51 

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.