c# - XML Comments for nullable 2D Array -


how correct specify xml comments 2d array of nullable doubles? following gives me syntax error.

/// <returns>the <see cref="double[,]"/>.</returns> public double?[,] get2darray() {     ... } 

if 2d array of doubles i'd use:

/// <returns>the <see cref="double{t,t}]"/>.</returns> public double[,] get2darray() {     ... } 

and if single value i'd use:

/// <returns>the <see cref="nullable{double}"/>.</returns> public static double? getnullabledouble() { 

i can't seem combine these 2 concepts correct comments.

after reading here, perhaps want,

/// <summary> /// gets 2d array /// </summary> /// <returns>the <see cref="t:double?[,]"/>.</returns> public double?[,] get2darray() {     ... } 

as commented, rather multi-dimensional array (double?[,]) should consider jagged, internal .net implementation superior. additionaly, if think of interfaces promises, should make smallest possible promise, easier keep.

perhaps,

/// <summary> /// gets 2d array /// </summary> /// <returns> /// <see cref="t:ienumerable{ienumerable{double?}}"/> data. /// </returns>     public ienumerable<ienumerable<double?>> getdata() {     ... } 

would suffice.


Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -