Skip to content

Instantly share code, notes, and snippets.

@pingkunga
Created March 18, 2025 02:38
Show Gist options
  • Save pingkunga/dad979ef991e93f3d1d81d3bcbad87f2 to your computer and use it in GitHub Desktop.
Save pingkunga/dad979ef991e93f3d1d81d3bcbad87f2 to your computer and use it in GitHub Desktop.
Back to Basic: Fundamental Data Structure in C#
int[] sourceIndex = new int[this._sourceGridView.SelectedRowsCount];
for (int row = this._sourceGridView.SelectedRowsCount - 1; row >= 0; row--){
if (_sourceGridView.GetSelectedRows()[row] >= 0){
sourceIndex[row] = this._sourceGridView.GetDataSourceRowIndex(this._sourceGridView.GetSelectedRows()[row]);
}
else{
sourceIndex[row] = this._sourceGridView.GetSelectedRows()[row];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment