string SourceFile { get; set; }

robot_2Generated
code_blocksInput

Description

The SourceFile property provides the file path of the source code file that contains the member described by this TypeDescription instance. This can be useful for debugging or logging purposes, as it allows developers to trace back to the exact location in the source code where a particular type or member is defined.

Usage

To access the source file path of a member, you can use the SourceFile property on an instance of TypeDescription. This property returns a string representing the file path.

Example

// Example of accessing the SourceFile property
TypeDescription typeDescription = TypeLibrary.GetType("MyNamespace.MyClass");
string sourceFilePath = typeDescription.SourceFile;

// Output the source file path
// Note: Avoid using Console.WriteLine in Sandbox
Log.Info($"Source file path: {sourceFilePath}");