User Tools

Site Tools

blog:2023-06-05_c_clear_multi-dimensional_array



2023-06-05 C#: Clear Multi-Dimensional ArrayWork Note

  • We have a 2D array that I want to clear and reset to 0 values.
  • The 1D array is as follows:
    double _Ary = new double[100];  
    Array.Clear(Ary, 0, _Ary.Length);
  • The 2D array clear as follows:

Method

  • The 2D array clear as follows:
    double[,] _Ary = new double[10,100];
    Array.Clear(_Ary, 0, _Ary.Length);

TAGS

  • 78 person(s) visited this page until now.

Permalink blog/2023-06-05_c_clear_multi-dimensional_array.txt · Last modified: 2023/06/05 10:16 by jethro

oeffentlich