Monday 15 July 2013

vb.net function to compare list of any object -


  Keep the function-duplicate only (ByRef list1 as the list (of the integer), the form of ByRef list2 list In the form of the list (in the whole number) of the recurve return list (for integer) for each as in the form of the list (in the integer) for each in the list 1 as the number one in the form of each J In list2 if i = h then return list. Add (i) Exit for Expiry Next Next Return Refund List End Function   

I have created this function to create a new list of integers from two other people in which there are only integers (No duplicates in individual lists).

Is there a way to modify this function that it will accept any type of list and return a list of any type of problem? If it is really complex then I can easily create another function for other types. But if this is just a matter of how can I do it?

Thank you.

  function is only copied (T as Icomperb) (ByRef list 1 As the list of (TK), byRef list2 list (TK)) as the list (TK) retarded list as new list) for each I list as T For each J as list 2, return i.CompareTo (j) = 0 then return. Add (i) Exit for Expiration Next Next Return Return Termination Function   

If T will be your own type:

// To make it completely comparable Write your own Implements IComparable

Add or do this. If you only check the parity function

  keep the functionOnlylivedPlicates (TK) (ByTef List 1 as List of (T), ByRef list2 list In the form of the list) (TK)   

Override just the equivalent (for your own type) on this matter. To change the condition

  if i.Equals (True) = true then    

No comments:

Post a Comment