Cook Computing

.NET Arrays

June 12, 2002 Written by Charles Cook

An excellent article by Dr GUI.NET on Arrays in the .NET Framework (via Sam Gentile).

One thing not mentioned is the fact that arrays of arrays ("jagged arrays" or "ragged-row arrays") are not CLS compliant. They were in the .NET betas (at least the compiler passed them as CLS) and were ideal as the basis for the .NET return type for the XML-RPC Introspection API method system.methodSignature. This returns an array of method signatures. Each signature is an array of strings, the first string being the return type, the remaining string(s) being the parameter types.

As a result the signature of corresponding built-in proxy method in class XmlRpcClientProtocol had to be changed from:

public string[][] SystemMethodSignature(string MethodName)


public object[] SystemMethodSignature(string MethodName)

where each object in the returned array is an array of strings, which is not so convenient to use. I've no idea why jagged-arrays were not included in the CLS when they are supported by the CLR.