Private and protected invisible to owner? RRS feed

  • Question

  • I thik I ran into a little bit of a bug. for some reason while I was coding a pretty simple little class all of a sudden everything inside of the class that was not public became invisible to itself. I dont know how that happened, but I double checked all of my code for errors, and it looks like the only way I could get it to build was to make everything public! Strange... Is this a bug that I should report?

    Here is the whole sorce.. If anyone could point out something I missed I would appreciate it.

    // MCLibrary.h
    #pragma once
    using namespace System;
    using namespace System::Net;
    using namespace System::Collections;
    using namespace System::ComponentModel;
    namespace MCLibrary {
    	public ref class Listener {
    	public: property bool AutoCon {
    			bool get() {
    				return this->autocheck;
    			void set(bool value) {
    				this->autocheck = value;
    	public: bool autocheck;
    	public: bool pendingclient;
    	public: int pendingcount;
    	public: System::Collections::Queue ^clientconnect;
    	public: System::Collections::Queue ^clientdisconnect;
    	public: System::Collections::Queue ^clientsend;
    	public: System::Collections::Queue ^clientrecieve;
    	public: System::ComponentModel::BackgroundWorker ^thread1;
    		void Initialize(void) {
    			this->thread1 = gcnew System::ComponentModel::BackgroundWorker();
    			// Thread settings.
    			this->thread1->WorkerReportsProgress = true;
    			this->thread1->WorkerSupportsCancellation = true;
    			this->thread1->DoWork += gcnew DoWorkEventHandler(this, &Listener::thread1_DoWork);
    			this->thread1->ProgressChanged += gcnew ProgressChangedEventHandler(this, &Listener::thread1_ProgressChanged);
    			this->thread1->RunWorkerCompleted += gcnew RunWorkerCompletedEventHandler(this, &Listener::thread1_RunWorkerCompleted);
    		// Thread event handlers.
    		void thread1_DoWork(Object ^sender, DoWorkEventArgs ^e) {
    			BackgroundWorker ^worker = dynamic_cast<BackgroundWorker^>(sender);
    		void thread1_ProgressChanged(Object ^/*sender*/, ProgressChangedEventArgs ^e) {
    		void thread1_RunWorkerCompleted(Object ^/*sender*/, RunWorkerCompletedEventArgs ^e) {
    Thursday, June 4, 2009 9:42 PM

All replies

  • If you need help in C++/CLI syntax, ask in the Visual C++ language forum instead of here.
    MSMVP VC++
    Friday, June 5, 2009 2:32 AM