vb conversion to c#

Feb 18 2009 3:22 AM

Would anyone be able to convert this, excellent utility, to c#, please.

Public Class XMLItemList

    Private sb As System.Text.StringBuilder

     Public Sub New()

        sb = New System.Text.StringBuilder

        sb.Append("<items>" & vbCrLf)

    End Sub

     Public Sub AddItem(ByVal Item As String)

        sb.AppendFormat("<item id={0}{1}{2}></item>{3}", Chr(34), Item, Chr(34), vbCrLf)

    End Sub

     Public Overrides Function ToString() As String

        sb.Append("</items>" & vbCrLf)

        Return sb.ToString

    End Function

 End Class


Answers (2)