Converting Able 5 vb object code to Able 7 C# code
Posted: Tue Dec 30, 2008 5:49 pm
I'm working on implementing the old Able 5 cross sell webpages, categories function. (I see pluggables posted an add-on for some of this, but I need the cross linking to work both ways and also be able to distribute the code)
I've got most of it done, but I'm stumped on some code in the cbObjectLinkCollection.vb, which is the collection that is used to show the links at the bottom of the product page, for example. Can anyone translate this into C#? I've tried a couuple of places online and it hasn't worked for this section
Here is what the translator does and it won't build because of the Item and the Count
Thanks
I've got most of it done, but I'm stumped on some code in the cbObjectLinkCollection.vb, which is the collection that is used to show the links at the bottom of the product page, for example. Can anyone translate this into C#? I've tried a couuple of places online and it hasn't worked for this section
Code: Select all
''' -----------------------------------------------------------------------------
''' <summary>
''' Gets or sets the Object_ID property.
''' </summary>
''' <value>The ID of the primary object.</value>
''' <remarks>
''' </remarks>
''' <history>
''' [loganr] 1/5/2004 Created
''' </history>
''' -----------------------------------------------------------------------------
Public Property Object_ID() As Integer
Get
Object_ID = m_Object_ID
End Get
Set(ByVal Value As Integer)
Dim i As Integer
If m_Object_ID <> Value Then
m_Object_ID = Value
For i = 0 To Count - 1
Item(i).Object_ID1 = Value
Next
End If
End Set
End Property
Code: Select all
public int ObjectType
{
get { ObjectType = _ObjectType; }
set
{
int i;
if (_ObjectType != value)
{
_ObjectType = value;
for (i = 0; i <= count - 1; i++)
{
item(i).ObjectType1 = value;
}
}
}
}