Should possibly have an "add" method in a PostingObject class in the
constructor of PostingObject. will call to add a Posting to the ? Does this
make sense? My sense is that a PostingObject needs a Posting, so would I do
this in the PostingObject Constructor?
Here is my code:
using System;
using System.Collections;
using Microsoft.ContentManagement.Publishing;
namespace test.CMS.library
{
/// <summary>
/// Summary description for PostingObject.
/// </summary>
public class PostingObject
{
// Instance variables
internal Posting[] objPosting = null;
public PostingObject()
{
}
// start date, end date
public PostingObject(DateTime StartDate, DateTime EndDate)
{
// Add to Array method to add Posting to PostingObject?
myAddtoArraymethod(objPosting); //???
}
public myAddtoArraymethod(Posting aPosting)
{
Some code to append the Posting to the Posting[] array?
}
#endregion
public String StartDate
{
get
{
if(objPosting != null)
{
return objPosting.StartDate.ToString();
}
else
{
return null;
}
}
}
public String EndDate
{
get
{
if(objPosting != null)
{
return objPosting.ToString();
}
else
{
return null;
}
}
}
} //END class
}// END namespace
Thanks,
John Haigh