# LogToFile() property

Set the ErrorInfo.LogToFile property to true to record time-stamped error codes to a file. Most UL for .NET method returns either an ErrorInfo object or 0. If an error occurs, an ErrorInfo object is returned.

Member of the ErrorInfo class.

## Property prototype

VB .NET

Public Property LogToFile As Boolean

C# .NET

public bool LogToFile [get, set]

## Notes

- Refer to the ErrHandling() method for an alternate method of handling errors.