473,320 Members | 1,936 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

C# class question

Hi, everyone.
I am writing a C# program. Some class in a project like following:

public class CL1
{
private string _strVal;

/// <summary>
/// Description of property Val.
/// </summary>
public string Val
{
get{ return this._strVal; }
set{ this._strVal = value; }
}

/// <summary>
/// Description of Function Func.
/// </summary>
public string Func()
{
return "my string";
}
}

But, when I include this project (or .dll file) to a new project and use
this class, the IDE prompt me to using class CL1 like following:

public class NewClass
{
static void Main()
{
CL1 c = new CL1();
c.set_Val("aaaaa");
string s = c.get_Val();
}
}

In this case, some property changed to two functions. And the function
"Func" changed to a property(The ICO of this function in IDE prompt is like a
property ICO). In other ways, All description in <summary> of propertys and
functions are disappear when I write code.
Who know why of that? Thanks!

Steven
Nov 16 '05 #1
1 1810
What is the exact error message you get if you do

public class NewClass
{
static void Main()
{
CL1 c = new CL1();
c.Val ="aaaaa";
string s = c.Val;
}
}

??
I'm presuming this is what you expect to be able to do...? (you should...! )
None of this is MC++ is it?

"Steven.Xu" <St******@discussions.microsoft.com> wrote in message
news:A5**********************************@microsof t.com...
Hi, everyone.
I am writing a C# program. Some class in a project like following:

public class CL1
{
private string _strVal;

/// <summary>
/// Description of property Val.
/// </summary>
public string Val
{
get{ return this._strVal; }
set{ this._strVal = value; }
}

/// <summary>
/// Description of Function Func.
/// </summary>
public string Func()
{
return "my string";
}
}

But, when I include this project (or .dll file) to a new project and use
this class, the IDE prompt me to using class CL1 like following:

public class NewClass
{
static void Main()
{
CL1 c = new CL1();
c.set_Val("aaaaa");
string s = c.get_Val();
}
}

In this case, some property changed to two functions. And the function
"Func" changed to a property(The ICO of this function in IDE prompt is
like a
property ICO). In other ways, All description in <summary> of propertys
and
functions are disappear when I write code.
Who know why of that? Thanks!

Steven

Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Bryan Parkoff | last post by:
I find an interesting issue that one base class has only one copy for each derived class. It looks like that one base class will be copied into three base classes while derived class from base...
20
by: modemer | last post by:
Question is as in subject. For example: class BaseClass { public: void func() { do something; } // I don't want this function being overloaded in its inherited class };
1
by: Alfonso Morra | last post by:
if I have a class template declared as ff: (BTW is this a partial specialization? - I think it is) template <typename T1, myenum_1 e1=OK, my_enum_2=NONE> class A { public: A(); virtual...
21
by: Jon Slaughter | last post by:
I have a class that is basicaly duplicated throughout several files with only members names changing according to the class name yet with virtually the exact same coding going on. e.g. class...
0
by: Sebastian Hiller | last post by:
Hello, i'm new to .Net (i'm using VB as language and i'm working in the code-behind mode) and i can't solve the following problem: I have a WebForm and want to Add a UserControl...
6
by: rodchar | last post by:
Hey all, I'm trying to understand Master/Detail concepts in VB.NET. If I do a data adapter fill for both customer and orders from Northwind where should that dataset live? What client is...
2
by: Chris Puncher | last post by:
Hi. I have a RCW class that was generated by the VS.NET2003 IDE when I added a COM dll reference to my project. This all works fine when I call methods on it. My initial problem is that in...
9
by: needin4mation | last post by:
I have a .aspx file and it's src. I also have a third file, a class that the src references. Everything is in the same directory/folder. Everything has the same namespace. How do I reference the...
43
by: Tony | last post by:
I'm working with GUI messaging and note that MFC encapsulates the message loop inside of a C++ class member function. Is this somehow inherently less robust than calling the message loop functions...
2
by: K Viltersten | last post by:
Suppose there is the following class structure. class S {...} class A : S {...} class B : S {...} class A1 : A {void m(){...}} class B1 : B {void m(){...}} class B2 : B {...} Just to clarify...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.