Reports for WinForms | ComponentOne
Using the C1ReportDesigner Control / Step 2 of 9: Add Class Variables and Constants
In This Topic
    Step 2 of 9: Add Class Variables and Constants
    In This Topic

    In this step, add the following code to your simple designer project to add class variables and constants:

    To write code in Visual Basic

    Visual Basic
    Copy Code
    ' fields        
    Private _fileName As String  ' name of the current file        
    Private _dirty As Boolean    ' current file has changed
    
    ' title to display in the form caption        
    Dim _appName As String = "C1ReportDesigner Demo"
    

    To write code in C#

    C#
    Copy Code
    // fields        
    private string  _fileName;     // name of the current file        
    private bool    _dirty;        // current file has changed
    
    // title to display in the form caption        
    private const string _appName = "C1ReportDesigner Demo";