I have this segment of code in VBA and it works well but when I tried to use it in VB.NET 2005, AutoCAD give me an error for line "ColObj.EndPoint=endpoint".
Please show me how can I write this code correctly.

Dim ColObj As AecsMember
For i As Integer=0 to PointList.Length-1
inspoint=PointList(i)
Set ColObj=Thisdrawing.ModelSpace.AddCustomObject("AecsMember")
ColObj.Type=aecsMemberTypeColumn
ColObj.StartPoint=stpoint
endpoint=inspoint
endpoint(2)=300.0
ColObj.EndPoint=endpoint
End For