Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Calling another class in another .cs file
Message
De
02/08/2002 11:20:57
Jerry Tovar
Dana Corporation Dana It
Maumee, Ohio, États-Unis
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Calling another class in another .cs file
Divers
Thread ID:
00685474
Message ID:
00685474
Vues:
52
Using C#.

How can I access another class in a different .cs file.

For example, how can I get myclass2 in namespace2 to access something in myclass1 namespace1?

////////////////////////////////
//one.cs
using System;

namespace namespace1
public class myclass1
{
public string mystring = ""
}
////////////////////////////////

////////////////////////////////
//two.cs
using System;

namespace namespace2
public class myclass2
{

public static void Main ()
{
///Access namespace1.myclass1 in one.cs here.
}

}
////////////////////////////////
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform