nunolevezinho Posted August 23, 2012 at 12:02 PM Report Share #473239 Posted August 23, 2012 at 12:02 PM Olá como podem ver a minha dúvida é bem simples. Tenho dos ficheiros c#. Num tenho várias funções. E no outro quero chama-las quando precisar delas. A minha dúvidá é como faço isso :\ Em php era so dar include e "chamar" a função. Mas em C# não sei como é :| Alguem me dá umas luzes? http://img221.imageshack.us/img221/2948/55438617.png Link to comment Share on other sites More sharing options...
pikax Posted August 23, 2012 at 01:00 PM Report Share #473242 Posted August 23, 2012 at 01:00 PM O C# faz include automatico, basta meteres o namespace e funciona, no teu caso penso que tenhas que meter: using Informito.Admins; using Informito.Dados; Por muito mais que que estude só aprendo uma coisa, que ainda tenho muita coisa para aprender. A beleza de um código está em decompor problemas complexos em pequenos blocos simples. "learn how to do it manually first, then use the wizzy tool to save time." "Kill the baby, don't be afraid of starting all over again. Fail soon, learn fast." Link to comment Share on other sites More sharing options...
M6 Posted August 23, 2012 at 01:02 PM Report Share #473243 Posted August 23, 2012 at 01:02 PM Tens igualmente de o incluir, vês no inicio do ficheiro os using? É isso mesmo que que tens de usar. Depois, dependendo da definição do que queres usar, se não é um singleton, ten de criar uma instância, depois invocas o método. 10 REM Generation 48K! 20 INPUT "URL:", A$ 30 IF A$(1 TO 4) = "HTTP" THEN PRINT "400 Bad Request": GOTO 50 40 PRINT "404 Not Found" 50 PRINT "./M6 @ Portugal a Programar." Link to comment Share on other sites More sharing options...
nunolevezinho Posted August 23, 2012 at 06:17 PM Author Report Share #473290 Posted August 23, 2012 at 06:17 PM Hmm obrigado afinal eu ja tinha o namespace, falta era instanciar o obj 🙂 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now