I have been working with NDoc and C# 2.0 for the last
couple days. It uses a lot of obsolete functions
(mostly in reflection and XML stuff) but it still works
fine for the most part. I did however find an issue
when it comes to generating documentation for generics.
The name of a generic is null and this results in a
NullReferenceException. A quick hack that can fix this
is to make the following change in ReflectionEngine.cs:
private string GetTypeName(Type type)
{
if(type.FullName == null)
{
return "T";
}
else
{
return type.FullName.Replace('+', '.').Replace("&",
null).Replace('+', '#');
}
}
Though not very elegant it works. To create a
description for T you'll have to create a class called
T or else the link just results in a 404.