Provides information about the SharePoint Foundation server where a form is located.
Assembly: Microsoft.Office.InfoPath (in Microsoft.Office.InfoPath.dll)
If the form template was published to a SharePoint Foundation server, the members of the class can be used to determine information about where the form is published, such as the URL of the document library where the form is located. To access the object associated with the current form, use the ServerInfo property of the XmlForm class.
In a managed code form template created using the object model provided by the members of the Microsoft.Office.InfoPath namespace, you can use the this (C#) or Me (Visual Basic) keyword in your form code to access the members of the XmlForm class directly (without requiring an object variable that establishes a reference to the XmlForm class).
For example, the following code example uses the this or Me keyword to access the object associated with the current form, and then uses the SharePointListUrl property to create a string variable that contains the URL of the document library where the form is located.