Hello,
Could someone please tell me what’s the trick to posting code on the forum?
I tried posting raw code and it’s not posted correctly, I tried escaping all the special characters but that didn’t work either. I am sure its something really stupid but I am not getting it.
I tried it with Google Chrome and Internet Explorer (ver 6 and 8) and none of them worked.
-------
On another note. Rocky, what about upgrading the newsgroups to a newer version? I think the community server is now on version 5, I have not played around with the newest version but it may have some cool things on it. No big deal, just a suggestion.
I copy/paste from Visual Studio.
The code loses its indentation and gets double spaced.
I often fix it in the post by hand if it is small enough.
The trick to removing the double spacing is to delete the blank line and then press Shift-Enter to get single line spacing.
I do not know of any way to paste into this forum without manually adjusting the code.
Joe
///Status property description
public GaugeStatuses Status
{
get { return GetProperty(StatusProperty); }
set { SetProperty(StatusProperty, value); }
}
private static PropertyInfo NameProperty = RegisterProperty(o => o.Name);
public string Name
{
get { return GetProperty(NameProperty); }
set { SetProperty(NameProperty, value); }
}
I think there has been some success copying and pasted code into Word first, then copying and pasting into the text editor here. Not sure why color doesn't work for me anymore tho
namespace Csla
{
/// <summary>
/// This is the base class from which most business objects
/// will be derived.
/// </summary>
/// <remarks>
/// <para>
/// This class is the core of the CSLA .NET framework. To create
/// a business object, inherit from this class.
/// </para><para>
/// Please refer to 'Expert C# 2008 Business Objects' for
/// full details on the use of this base class to create business
/// objects.
/// </para>
/// </remarks>
/// <typeparam name="T">Type of the business object being defined.</typeparam>
[Serializable()]
public abstract class BusinessBase<T> :
Core.BusinessBase, Core.ISavable where T : BusinessBase<T>
{
#region Object ID Value
/// <summary>
/// Override this method to return a unique identifying
/// value for this object.
/// </summary>
protected virtual object GetIdValue()
{
return null;
}
#endregion
#region System.Object Overrides
/// <summary>
/// Returns a text representation of this object by
/// returning the <see cref="GetIdValue"/> value
/// in text form.
/// </summary>
public override string ToString()
{
object id = GetIdValue();
if (id == null)
return base.ToString();
else
return id.ToString();
}
#endregion
}
xxx
rxelizondo:Sweeeeeeeeeeet! Thanks rsbaker0 and Joe. Wish Rocky would updated the forum to the latest community server version (I think is version 5). Maybe this issue are not existent in the newer version... but something tells me that it may be more trouble upgrading the forum that what its worth.
I have (or can get) a license for the current CS version. From what I understand, the upgrade takes a day or two - numerous SQL upgrade scripts, install/configure the new software and email gateway components and redo the UI style changes.
Fortunately my UI style changes are pretty minimal - mostly color changes.
I guess I have avoidance issues with this. I hate, hate, hate, hate fighting with email gateways and other network infrastructure stuff. So the idea of spending 1-2 days doing exactly that sort of thing is somewhere below the bottom of my list of things I want to do. Much like deciding that for the next two days you'll hit yourself on the head with a hammer repeatedly. :)
Maybe it is because in a previous life (many many years ago) I managed a help desk and IT support group. What a horrible type of work - though it does give one great appreciation for the difference between supportable software and unsupportable software, and so I'm very grateful for the experience I gained in that job, as it made me a much better developer.
Copyright (c) Marimer LLC