Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Having problem with class decaration when Building a class libraray

Having problem with class decaration when Building a class libraray

Scheduled Pinned Locked Moved C#
questioncsharpc++help
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    Tony_Joh
    wrote on last edited by
    #1

    Hello! I try to build a class library but I run into some problems. In the code for this class library there are some rows that have this kind of look public bool IsBottomMixValid(MeltPracDataGmix.BottomBlowing mix, int maxBottomFlow) As you can see here we have a class named MeltPracDataGmix that exist in the code for the project that build the actual exe file. So the class definition does not exist in this project for this class library. My qustion is what is the solution to this kind of problem. I assume if this was C++ it would be enough to include the class declaration which is the header file. But in C# we don't have any header files. So how do I do here? //Tony

    A 1 Reply Last reply
    0
    • T Tony_Joh

      Hello! I try to build a class library but I run into some problems. In the code for this class library there are some rows that have this kind of look public bool IsBottomMixValid(MeltPracDataGmix.BottomBlowing mix, int maxBottomFlow) As you can see here we have a class named MeltPracDataGmix that exist in the code for the project that build the actual exe file. So the class definition does not exist in this project for this class library. My qustion is what is the solution to this kind of problem. I assume if this was C++ it would be enough to include the class declaration which is the header file. But in C# we don't have any header files. So how do I do here? //Tony

      A Offline
      A Offline
      Ahmad Mahmoud candseeme
      wrote on last edited by
      #2

      Hi i don't understand you ! do you wanna pass the constructor or a method in the class public bool IsBottomMixValid(MeltPracDataGmix.BottomBlowing mix, int maxBottomFlow) is BottomBlowing a static method or property or what !! Ahmad Shaban -- modified at 4:07 Monday 20th March, 2006

      T 1 Reply Last reply
      0
      • A Ahmad Mahmoud candseeme

        Hi i don't understand you ! do you wanna pass the constructor or a method in the class public bool IsBottomMixValid(MeltPracDataGmix.BottomBlowing mix, int maxBottomFlow) is BottomBlowing a static method or property or what !! Ahmad Shaban -- modified at 4:07 Monday 20th March, 2006

        T Offline
        T Offline
        Tony_Joh
        wrote on last edited by
        #3

        Hello! Here below I have been more specific to my problem. I thing that you can understand what my problem is. I'm trying to build a class library which has a class called AvestaPlantFunc. In this project building a class libray exist a class called AvestaPlantFunc. In this class is there a method called IsBottomMixValid. Code not relevant for the question has been removed. This method IsBottomMixValid has one parameter and the type for this parameter is MeltPracDataGmix meaning passing class reference MeltPracDataGmix. Now to my question the definition for class MeltPracDataGmix does not exist in the same project as the class AvestaPlantFunc. Class MeltPracDataGmix exist in another project that build the exe file. When a class has a reference to another class as in my example is it nesessary that the full definition to class MeltPracDataGmix is existing in the same project. I assume if this was C++ it would be enough to include the class declaration which is the header file and not the implementation. But in C# we don't have any header files. So how do I do here? What is the solution to this problem when the class need another class. using System; using MeltPracData; namespace Common { public class AvestaPlantFunc { public bool IsBottomMixValid(MeltPracDataGmix mix) { //here is there some code } } } //Tony

        A 1 Reply Last reply
        0
        • T Tony_Joh

          Hello! Here below I have been more specific to my problem. I thing that you can understand what my problem is. I'm trying to build a class library which has a class called AvestaPlantFunc. In this project building a class libray exist a class called AvestaPlantFunc. In this class is there a method called IsBottomMixValid. Code not relevant for the question has been removed. This method IsBottomMixValid has one parameter and the type for this parameter is MeltPracDataGmix meaning passing class reference MeltPracDataGmix. Now to my question the definition for class MeltPracDataGmix does not exist in the same project as the class AvestaPlantFunc. Class MeltPracDataGmix exist in another project that build the exe file. When a class has a reference to another class as in my example is it nesessary that the full definition to class MeltPracDataGmix is existing in the same project. I assume if this was C++ it would be enough to include the class declaration which is the header file and not the implementation. But in C# we don't have any header files. So how do I do here? What is the solution to this problem when the class need another class. using System; using MeltPracData; namespace Common { public class AvestaPlantFunc { public bool IsBottomMixValid(MeltPracDataGmix mix) { //here is there some code } } } //Tony

          A Offline
          A Offline
          Ahmad Mahmoud candseeme
          wrote on last edited by
          #4

          Hi You are building a Class Library (dll) look for the namespace of The class MeltPracDataGmix and add this refrence in your project using TheNamespaceThatHoldstheClassMeltPracDataGmix; C# use the namespace technique instead of the header technique C, C++ ---> #include .Net ( including C# ) ---> using System; Ahmad Shaban

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups