VB.Net by API/System.Diagnostics/Conditional

Материал из VB Эксперт
Перейти к: навигация, поиск

mark Conditional

   
 

Imports System 
Imports System.Diagnostics
#Const DEBUG_LIST_CUSTOMERS = True
"#Const DEBUG_LIST_EMPLOYEES = True
public class Test
   public Shared Sub Main
        ListCustomers()
        ListEmployees()
   End Sub
    <Conditional("DEBUG_LIST_CUSTOMERS")> _
    Private Shared Sub ListCustomers()
        Console.WriteLine("ListCustomers")
    End Sub
    <Conditional("DEBUG_LIST_EMPLOYEES")> _
    Private Shared Sub ListEmployees()
        Console.WriteLine("ListEmployees")
    End Sub
End class