Partilhar via


Solution2.FullName Property

Definition

Gets the full path and name of the object's file.

public:
 property System::String ^ FullName { System::String ^ get(); };
public:
 property Platform::String ^ FullName { Platform::String ^ get(); };
[System.Runtime.InteropServices.DispId(28)]
public string FullName { [System.Runtime.InteropServices.DispId(28)] get; }
[<System.Runtime.InteropServices.DispId(28)>]
[<get: System.Runtime.InteropServices.DispId(28)>]
member this.FullName : string
Public ReadOnly Property FullName As String

Property Value

The full path and name of the object's file.

Implements

Attributes

Examples

Sub SolutionCountExample(ByVal dte As DTE2)  
    ' Counts the projects in a solution   
    ' Open a solution in Visual Studio before running this  
    ' example.  
   Try  
       Dim soln As Solution2 = CType(_applicationObject.Solution, _  
       Solution2)  
        ' List the number of projects.  
        MsgBox("Number of projects in" & soln.FullName & " is: " _  
        & vbCr & soln.Count)  
    Catch ex As System.Exception  
        MsgBox(ex.ToString)  
    End Try  
End Sub  
//you will need to add this reference to your project as well  
using System.Windows.Forms;  

public void SolutionCount(DTE2 dte)  
{  
    // Counts the projects and displays the full name of the solution.  
    // Open a solution in Visual Studio before running this  
    // example.  
    Try  
    {  
        Solution2 soln = (Solution2)_applicationObject.Solution;  
        // List the number of projects.  
        MessageBox.Show("Number of projects in" + soln.FullName   
+ " is: " + "\n" + soln.Count);  
    }  
    catch(SystemException ex)  
    {  
        MessageBox.Show("ERROR: " + ex);  
    }  
}  

Remarks

The FullName property is known as the FileName property in some versions of Visual Studio.

Applies to