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
Post a Comment