Solution3.Projects Özellik
Tanım
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
Şu anda çözümdeki projelerin bir koleksiyonunu alır.
public:
property EnvDTE::Projects ^ Projects { EnvDTE::Projects ^ get(); };
[System.Runtime.InteropServices.DispId(41)]
public EnvDTE.Projects Projects { [System.Runtime.InteropServices.DispId(41)] get; }
[<System.Runtime.InteropServices.DispId(41)>]
[<get: System.Runtime.InteropServices.DispId(41)>]
member this.Projects : EnvDTE.Projects
Public ReadOnly Property Projects As Projects
Özellik Değeri
Bir Projects koleksiyon.
Uygulamalar
- Öznitelikler
Örnekler
Sub ProjectsExample(ByVal dte As DTE2)
' Display the number of projects in a solution.
' Open a solution in Visual Studio before running this example.
Try
Dim soln As Solution3 = CType(_applicationObject.Solution, _
Solution3)
Dim solnName As String = _
System.IO.Path.GetFileNameWithoutExtension(soln.FullName)
MsgBox("Solution " & solnName & _
" has " & soln.Projects.Count.ToString() & " projects")
Catch ex As System.Exception
MsgBox(ex.ToString)
End Try
End Sub
using System.Windows.Forms;
public void ProjectExample(DTE2 dte)
{
// Display the number of projects in a solution.
// Open a solution in Visual Studio before running this example.
try
{
Solution3 soln = (Solution3)_applicationObject.Solution;
string solnName =
System.IO.Path.GetFileNameWithoutExtension(soln.FullName);
MessageBox.Show("Solution " + solnName + "has "
+ soln.Projects.Count.ToString() + " projects.");
}
catch(SystemException ex)
{
MessageBox.Show("ERROR: " + ex);
}
}