soulbe Posted November 23, 2007 at 01:39 AM Report Share #149587 Posted November 23, 2007 at 01:39 AM Boa noite! Ando aqui de roda de um programa ... Tenho um evento ao qual quero adicionar um handler, e crio um delegate com um handler. Agora o meu problema é que tenho métodos estáticos e métodos de instância, e a framework .Net 2.0, a que eu tenho, aceita criar delegates com os dois tipos de métodos, mas quando vai criar o delegate com o método de instância dá-me System.ArgumentException, sendo que o erro, Error binding to target method. Agradeço a quem me possa dar ideias de como resolver o meu problema. Obrigado Link to comment Share on other sites More sharing options...
TheDark Posted November 23, 2007 at 02:12 AM Report Share #149589 Posted November 23, 2007 at 02:12 AM Código? Desaparecido. Link to comment Share on other sites More sharing options...
soulbe Posted November 27, 2007 at 05:48 PM Author Report Share #150712 Posted November 27, 2007 at 05:48 PM Resolvi o problema. O problema é que o overload do método tinha de ser diferente quando era de instância, tinha de passar também um objecto que continha os handlers que eu queria associar. Link to comment Share on other sites More sharing options...
TheDark Posted November 28, 2007 at 02:20 AM Report Share #150843 Posted November 28, 2007 at 02:20 AM Não és do ISEL? :🙂 Desaparecido. Link to comment Share on other sites More sharing options...
soulbe Posted December 18, 2007 at 07:25 PM Author Report Share #155058 Posted December 18, 2007 at 07:25 PM Yo!so vim agora cá ao fórum...e sim, souv:P de leic Link to comment Share on other sites More sharing options...
TheDark Posted December 18, 2007 at 07:52 PM Report Share #155064 Posted December 18, 2007 at 07:52 PM Pois... é que passei pelo mesmo problema 😄 Desaparecido. Link to comment Share on other sites More sharing options...
saunde Posted December 19, 2007 at 12:35 AM Report Share #155140 Posted December 19, 2007 at 12:35 AM AVE rula ! Um blog :Sem Cafeína 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