0

Hi,
I'm trying to translate a class to c# from vb6 (see C# code below). It fails to Build in Visual Studio, giving me "class used as type" error to relation to m_Dept. This assignment worked in VB6 and in VB.net but I want to rewrite the class in C#. How can I assigned another class object as property of class Employee?
(Class Department is included as a file in the same VS Solution as class Employee. It compiles without issues)

Thanks for Answers!

namespace Employee   
{

    public class Employee

    {
///-- CLASS LOCAL VARIABLES DECLARATION
///Option Explicit On - not used in C#

private string n_FirstName;
private string n_LastName;
private string n_FullName;

private clsDepartment d_Dept;


        private Employee(){
            this.m_Dept = new clsDept();
            this.m_ctDept = new clsDept();
        }

         ~Employee(){
        this.m_dept = null;
        this.m_ctDept = null;

        }

Edited by Dani: Formatting fixed

2
Contributors
1
Reply
2
Views
5 Years
Discussion Span
Last Post by thines01
0

I don't see where m_Dept ior m_dept s defined.
...remember, C# is case-sensitive.

Edited by thines01: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.