﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » Business Objects and Data Access (How do I?)  » BusinessObject.ToString</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Sun, 13 Sep 2026 13:22:38 GMT</lastBuildDate><ttl>20</ttl><item><title>BusinessObject.ToString</title><link>http://forum.strataframe.net/FindPost23455.aspx</link><description>I am using the Business Objects ToString method to return the name of the business object. I have attached a sample project that illustrates what is going on.&lt;/P&gt;&lt;P&gt;I am using a routine that uses reflection to loop through each business object in an assembly and generate's a html help documentation file, I name these files using the business object tostring method. So for instance the filename might be Businessobject1.htm.&lt;/P&gt;&lt;P&gt;&amp;nbsp;hohever If&amp;nbsp;I call the same business objects ToString method from&amp;nbsp;within a&amp;nbsp;form I end up&amp;nbsp;with [Businessobject1].htm. It seems the [] brackets are being added.&lt;/P&gt;&lt;P&gt;Paul</description><pubDate>Tue, 16 Jun 2009 13:26:58 GMT</pubDate><dc:creator>Paul Chase</dc:creator></item><item><title>RE: BusinessObject.ToString</title><link>http://forum.strataframe.net/FindPost23523.aspx</link><description>Gotcha, just curious :)</description><pubDate>Tue, 16 Jun 2009 13:26:58 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: BusinessObject.ToString</title><link>http://forum.strataframe.net/FindPost23522.aspx</link><description>Hi Trent,&lt;/P&gt;&lt;P&gt;I thought perhaps you guys were overriding the method for some reason, so did not look past that. As for why I am doing this... &lt;/P&gt;&lt;P&gt;I am outputing end user&amp;nbsp;help. In my base form&amp;nbsp;code I have&amp;nbsp;attibutes and property's that are specific to generating&amp;nbsp;and displaying user help. I then&amp;nbsp;read through the project using reflection&amp;nbsp;and&amp;nbsp;generate&amp;nbsp;a html help style docs for Forms that contain&amp;nbsp;specific custom attributes etc. I can then generate&amp;nbsp;specific info on bound controls , required fields , business rules&amp;nbsp;, change logs as well as custom property's.&amp;nbsp;once&amp;nbsp;the html file is generated I&amp;nbsp;then set a property&amp;nbsp; containing&amp;nbsp;the URL of the generated page so when&amp;nbsp;the user hits the help button or F1&amp;nbsp;from the form it will call &lt;FONT size=2&gt;System.Windows.Forms.Help.ShowHelp&amp;nbsp;and pass in the correct help url&amp;nbsp;to the CHM that is generated. &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;I have not used Sandcastle it but it looks like it&amp;nbsp;generates&amp;nbsp;class documention more geared to the developer. I am not sure that it would fit in what I am doing&amp;nbsp;</description><pubDate>Tue, 16 Jun 2009 11:44:28 GMT</pubDate><dc:creator>Paul Chase</dc:creator></item><item><title>RE: BusinessObject.ToString</title><link>http://forum.strataframe.net/FindPost23468.aspx</link><description>This is actually .NET adding this as we do not override the ToString() method.  Instead of getting into why, etc. just call the ToString() of the type:&lt;br&gt;
&lt;br&gt;
[codesnippet]Console.WriteLine(Me.BusinessObject11.GetType().ToString())[/codesnippet]&lt;br&gt;
&lt;br&gt;
This will give you what you are wanting.  My second question would be....why are you writing this?  SandCastle is free and it does this for you.  You could also buy tools such as DocumentX from Innovasys...but SandCastle is better, free, and what Microsoft uses.</description><pubDate>Fri, 12 Jun 2009 09:11:05 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item></channel></rss>