Click here to Skip to main content
16,004,564 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have two array int [] a={1,2,3,4,5,6}
int [] c= { 2,3,}
how to check c array item contain in 'a' array in C# 2.0 framework
Posted

C#
int[] d= new int[d.length];
int l=0;
for (int j=0;j<c.length;>{
    for (int k=0;k<a.length;>    { 
         if(c[j]==a[k])
         {
           d[l]=c[j];
           l++;
         }
    }
}


Hope this helps
 
Share this answer
 
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900