BitmapSaverWindow.DeleteSelectedListItem C# (CSharp) Method

DeleteSelectedListItem() private method

private DeleteSelectedListItem ( ) : void
return void
    private void DeleteSelectedListItem()
    {
        if( fLength > 1 ){

            int i = 0;
            string selected = fList[ selectedIndex ];
            string[] temp = fList;
            fList = null;
            fList = new string[temp.Length-1];

            foreach( string s in temp ){
                if( selected != s ) {
                    fList[i] = s;
                    i++;
                }
            }

            fLength = fList.Length;

        }else{

            fList = null;
            fLength = 0;
        }

        selectedIndex = -1;
        Repaint();
    }