Make library module comments appear in object browser

  • Thread starter Thread starter Gary James
  • Start date Start date
G

Gary James

I'm making a C# library module that has methods & properties that I've
commented. I would like these comments to appear in the object browser when
the library is used by another .NET application.

The documentation is pretty thin describing this feature. All I could find
was a reference to using XML documentation techniques; specifically using
the "///" comment. I tried this but it didn't work.

Any ideas? Thanks.

Gary ...
 
Gary James said:
I'm making a C# library module that has methods & properties that I've
commented. I would like these comments to appear in the object browser when
the library is used by another .NET application.

The documentation is pretty thin describing this feature. All I could find
was a reference to using XML documentation techniques; specifically using
the "///" comment. I tried this but it didn't work.

Any ideas? Thanks.

Gary ...

You're halfway there. Writing the "///" comments is the first step.
The next step is going to the project-properties and under Configuration
Properties | Build enter a value for "Xml Documentation File"
(usual seems to be: same directory as debug output path, filename
same as project name, extension ".xml")
Then a rebuild and you are set.

Hans Kesting
 
Please read this snippet:
/// <summary>
/// ExecuteNonQuery Operation,Manual Transaction
/// </summary>
/// <param name="conn">SqlConnection</param>
/// <param name="trans">SqlTransaction</param>
/// <param name="commandType">CommandType </param>
/// <param name="commandText">CommandText:just like Sql
code and so on</param>
/// <param name="param">Sql Parameter</param>
/// <returns></returns>
public int ExecuteNonQuery(SqlConnection
conn,SqlTransaction trans,CommandType commandType,string
commandText,params SqlParameter[] param)
{
_affectRows=0;

SqlCommand cmd=new SqlCommand();
try
{

PrepareCommand
(cmd,conn,trans,commandType,commandText,param);

_affectRows=cmd.ExecuteNonQuery();
trans.Commit();
}
catch(Exception ex)
{
_affectRows=-2;
trans.Rollback();
OnnonQueryEvent(this,ex);
throw ex;

}
finally
{
cmd.Dispose();
cmd=null;
}
return _affectRows;
}
 
Back
Top