Remove item in array
ASP.NET
2
Posts
2
Posters
0
Views
1
Watching
-
Hi all i have array [0,1] = "abc" [0,2] = "dfd" [0,3] = null [0,4] = "abc" [0,5] = "abc" [0,6] = null How can i remove item have value is null ?
hi AnhTin, I am dilip, you can remove element from array you need to check whether element consists of null then you need to shift up array.
public static void check(array[][]) int i,j,k; for(i=0;i<1;i++) { for(j=1;j<7;j++) { j=k; if(array[i][j]==null) { while(k<7) { array[i][k]=array[i][k+1]; k++; } } } }
Hope this will help you. Dilip Kumar VishwakarmaProgrammer .Net Consulting