473,623 Members | 3,365 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

member names cannot be the same as their enclosing type

in sub class i can't define a constructor it give me error when i want it
to...
"category member names cannot be the same as their enclosing type"

namespace Database
{
public class Structure
{
public class category
{
public int category_id;
public int category_belong _id;
public string category_name;
public string DisplayMember{ get{ return category_name; } }
public string ValueMember{ get{ return category_id.ToS tring(); } }

public void category(){}
public void category(Databa se.Query sender)
{
this.category_i d = sender.myReader .GetInt32(0);
this.category_b elong_id = sender.myReader .GetInt32(1);
this.category_n ame = sender.myReader .GetString(2);
sender.myReader .Close();
sender.myConnec tion.Close();
}
}
}
Nov 16 '05 #1
1 24242
i got it.. even no void for constructors
Nov 16 '05 #2

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

Similar topics

22
2239
by: BRIAN VICKERY | last post by:
I've heard that some compilers reserve the '_' starting a symbol for system variables/symbols. I can not find this documented anywhere (so far). I've used an '_' at the end of member variables (ie. Uint16 bar_; ) to distinquish private fields, but this does not stand out as much as if the '_' were at the begginning of the name as in the following class declaration. class Foo { private: Uint16 _baz;
5
3127
by: Walter Tross | last post by:
Somebody with a very regulatory mind in this newsgroup has written that it's better not to use a leading underscore for class member names, because names with a leading underscore are used internally by compilers (well, not so internally, since they appear in header files). I personally use the leading underscore (followed by a lower case letter), which I consider to be much more readable than the trailing underscore. My reasoning is...
5
32721
by: Nik | last post by:
I keep getting the following error 'member names cannot be the same as their enclosing type' with the code below. public class HelpText { private string _textToDisplay; private string _cssClass; public string TextToDisplay { get {return _textToDisplay;}
1
4347
by: | last post by:
in sub class i can't define a constructor it give me error when i want it to... "category member names cannot be the same as their enclosing type" namespace Database { public class Structure { public class category {
6
14554
by: Tim Cartwright | last post by:
I have a page that has the login control on it, nothing else. This page inherits from a master page, neither page has any code in it. This page works perfectly when running on the WebDev debug web server. I am able to log in. However after publishing the page to my local IIS, it results in the below error. This error is occurring on the Visual Studio.Net 2k5 release version, but did not occur on the beta 2, same code. A point of interest, is...
4
1319
by: Turbot | last post by:
Hello, I have an ENUM that looks like this: Public Enum Locations As Byte Top_Left Top_Middle Top_Right Middle_Left Middle_Middle
1
4490
by: Veerle | last post by:
Hi, I generate class from xsd files using XSDObjectGen. But the generated code doesn't compile because there are properties with the same name as the class name, which is not allowed in C# : "member names cannot be the same as their enclosing type". I cannot alter the xsd files, because they are third party xsds, and the generated xml has to conform to this xsd schemas in order for us to be able to use them. Is there some kind of...
1
1580
by: asmx126453 | last post by:
hey guys next question :p its about the member names that the cant be the same the precies error is this 'VerzamelbladOverzicht': member names cannot be the same as their enclosing type its about this page VerzamelbladOverzicht.aspx <%@ Page language="c#" Inherits="DotNet.VerzamelbladOverzicht" debug="False" CodeFile="VerzamelbladOverzicht.aspx.cs" %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
1
2878
by: Ravikant Varma | last post by:
public partial class frmStoreMaster { private void FillData(string StoreID) { DAStoreMaster objStoreMst = new DAStoreMaster(); try {
0
8221
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8162
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8603
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8463
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6104
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5560
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4154
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2593
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1468
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.