Border enumerator

Formatting a PPT table used to be fast and easy - now it seems to take seven lines of code to do what one line would do before. Anyway, your examples are in C#, and I just can't seem to get it to work in VB. Here is the code:

Dim ieBorder As IEnumerator() = cell.BorderTop.GetEnumerator()

Dim ln As Aspose.Slides.Line

While ieBorder.MoveNext

ln = ieBorder.Current

ln.LineFormat.ForeColor = Drawing.Color.Blue

ln.LineFormat.Width = 2

End While

If I import System.Collections, I get a "MoveNext is not a member of System.Array." However, if I import System.Collections.Generic it wants a Type argument for IEnumerator. When I add (Of Aspose.Slides.Line) I get a runtime "Unable to cast object of type 'ArrayListEnumeratorSimple' to type 'System.Collections.Generic.IEnumerator`1[Aspose.Slides.Line]'."

Is there anyway we can go back to "cell.BorderTop.LineFormat.Width = 2?"

Dear dfiala,

I have updated the thread with VB.NET example.

Missed the CType. Works well - thanks for the quick reply!