Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > .NET Languages
You last visited: Today at 07:59

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



VB.Net Delegate

Discussion on VB.Net Delegate within the .NET Languages forum part of the Coders Den category.

Reply
 
Old   #1
 
Cyperghost's Avatar
 
elite*gold: 0
The Black Market: 379/0/0
Join Date: Jan 2013
Posts: 11,449
Received Thanks: 210
VB.Net Delegate

Ich habe da mal eien frage wie funktioniert in VB.Net Delegate?

ich weiß das es in C# so funktioniert

Code:
private delegate string GetString(int index);


if (listView1.InvokeRequired)
                            a = listView1.Invoke(new GetString(Item1), zahl).ToString();
                        else
                            a = Item1(zahl);

public string Item1(int index)
        {
            return listView1.Items[index].Text;
        }
aber wie in VB.Net?
wäre sehr nett wenn mir da jemand helfen könnte
Danke
Cyperghost is offline  
Old 02/08/2013, 19:06   #2
 
Kraizy​'s Avatar
 
elite*gold: 0
The Black Market: 471/0/0
Join Date: Apr 2010
Posts: 9,696
Received Thanks: 1,811
Naja ich würds auf die Schnelle so machen:

PHP Code:
Public Function GetItemText(target As ListViewindex As Integer) As String
   
If target.InvokeRequired
      
Return target.Invoke(Function() target.Items(index).Text).ToString()
   Else
      Return 
target.Items(index).Text
   End 
If
End Function 
Kraizy​ is offline  
Thanks
1 User
Old 02/08/2013, 19:27   #3
 
Cyperghost's Avatar
 
elite*gold: 0
The Black Market: 379/0/0
Join Date: Jan 2013
Posts: 11,449
Received Thanks: 210
Danke dir
Cyperghost is offline  
Reply


Similar Threads Similar Threads
[C#] delegate bool functions
12/29/2012 - .NET Languages - 3 Replies
Moin moin, Nach langer zeit melde ich mich dann mal von den toten zurück :) Ich habe ein kleines Problem, und zwar möchte ich eine bestimmte Funktion die Bsp. Einen zauber startet überladen. Public static void Cast(string spellname) { Casting(spellname) }



All times are GMT +1. The time now is 08:00.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.