473,804 Members | 2,024 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

case sensitivity

I have class written in C# with elements:

1. Private variable: aaa
2. Protected overridable property AAA

the only differrence in names is case sensitivity.

Is it possible to shadow variable aaa in inherited class using Visual Basic
?
I can't find a solution because of Visual Basic case insensitivity.. .

Nov 21 '05 #1
6 1666
The best way to do this is to name your private variables _aaa and your
property as AAA or perhaps Aaa

I often write in C# and the convert to VB using a translation tool. This
method works just fine.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

"crosser" <kr*******@wp.p l> wrote in message
news:df******** **@atlantis.new s.tpi.pl...
I have class written in C# with elements:

1. Private variable: aaa
2. Protected overridable property AAA

the only differrence in names is case sensitivity.

Is it possible to shadow variable aaa in inherited class using Visual
Basic ?
I can't find a solution because of Visual Basic case insensitivity.. .

Nov 21 '05 #2
yeah, of course I know that, but unfortunately it is not my piece of code.
I can't modify base class. Only what I can do is inherit it and shadow this
bloody property. But I can't find out how to do it in VB because of that
names.

Any other ideas ?

"Bob Powell [MVP]" <bob@_spamkille r_bobpowell.net > wrote in message
news:OJ******** **********@tk2m sftngp13.phx.gb l...
The best way to do this is to name your private variables _aaa and your
property as AAA or perhaps Aaa

I often write in C# and the convert to VB using a translation tool. This
method works just fine.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

"crosser" <kr*******@wp.p l> wrote in message
news:df******** **@atlantis.new s.tpi.pl...
I have class written in C# with elements:

1. Private variable: aaa
2. Protected overridable property AAA

the only differrence in names is case sensitivity.

Is it possible to shadow variable aaa in inherited class using Visual
Basic ?
I can't find a solution because of Visual Basic case insensitivity.. .


Nov 21 '05 #3
Crosser,

You should not be able to reach that variable.

In C# you should not use as well two names which do destinct them only from
there cases if they are in whatever way public.

That is against the CLS-Compliant code.

http://msdn.microsoft.com/library/de...pliantcode.asp

I hope this helps,

Cor
Nov 21 '05 #4
Write your derived class in C# which doesn't have this problem? Obviously
the original base was written in C# otherwise they wouldn't have been able
to use those names.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

"crosser" <kr*******@wp.p l> wrote in message
news:df******** **@nemesis.news .tpi.pl...
yeah, of course I know that, but unfortunately it is not my piece of code.
I can't modify base class. Only what I can do is inherit it and shadow
this bloody property. But I can't find out how to do it in VB because of
that names.

Any other ideas ?

"Bob Powell [MVP]" <bob@_spamkille r_bobpowell.net > wrote in message
news:OJ******** **********@tk2m sftngp13.phx.gb l...
The best way to do this is to name your private variables _aaa and your
property as AAA or perhaps Aaa

I often write in C# and the convert to VB using a translation tool. This
method works just fine.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

"crosser" <kr*******@wp.p l> wrote in message
news:df******** **@atlantis.new s.tpi.pl...
I have class written in C# with elements:

1. Private variable: aaa
2. Protected overridable property AAA

the only differrence in names is case sensitivity.

Is it possible to shadow variable aaa in inherited class using Visual
Basic ?
I can't find a solution because of Visual Basic case insensitivity.. .



Nov 21 '05 #5
"crosser" <kr*******@wp.p l> schrieb im Newsbeitrag
news:df******** **@atlantis.new s.tpi.pl...
I have class written in C# with elements:

1. Private variable: aaa
2. Protected overridable property AAA
This is per-se a bad thing. Two identifiers should always differ in more
than the case only.
Is it possible to shadow variable aaa in inherited class using Visual
Basic ?


What exactly do you want to archieve by shadowing the variable?

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #6
On 2005-08-30, crosser <kr*******@wp.p l> wrote:
I have class written in C# with elements:

1. Private variable: aaa
2. Protected overridable property AAA

the only differrence in names is case sensitivity.

Is it possible to shadow variable aaa in inherited class using Visual Basic
?
I can't find a solution because of Visual Basic case insensitivity.. .


I'm really missing something here, because I don't see where case
insensitivity has anything to do with this...

You can't shadow aaa because it's private. It's not accessible to the
child class.

You shouldn't have any problem overriding AAA. The private aaa variable
should be irrelevant. You can also shadow AAA without problems,
although I'd be dubious about doing that.

What's the problem you're having exactly? Are you sure aaa is private?


Nov 21 '05 #7

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

Similar topics

32
3173
by: Elliot Temple | last post by:
Hi I have two questions. Could someone explain to me why Python is case sensitive? I find that annoying. Also, why aren't there multiline comments? Would adding them cause a problem of some sort? Thanks, Elliot
761
28983
by: Neo-LISPer | last post by:
Hey Recently, I researched using C++ for game programming and here is what I found: C++ game developers spend a lot of their time debugging corrupted memory. Few, if any, compilers offer completely safe modes. Unsurprisingly, there is a very high failure rate among projects using C++ for modern game development.
16
2946
by: Starwiz | last post by:
I'm a VB.net programmer, and I'm about to start working with two C++ programmers and teach them .net. I've decided to use C# in teaching them, since it's similar enough to VB.net that I can read and write it, and it's what's most familiar to them. My major problem with C#, however, is its case- sensitivity. I've heard people talk about how wonderful it is until they're blue in the face, but the fact stands
3
1147
by: Jason Tesser | last post by:
I am converting data from Access into Postgres and ran into an issue with case sensitivity. Can I write queries in Access that will be case insensitive without rewriting the queries. So I would like to know if this be handled in Postgres or even if someone knows in Access. Thank you.
14
2370
by: Christian Sell | last post by:
Hello, I am running into a problem with PGs case sensitivity with regard to column and table names. I am using program components that require the object names returned from database metadata queries to be in uppercase. Therefore, I am forced to use double quotes in the table creation scripts, like create table "BLA" (); However, after doing that, all scripts that reference objects without quotes
15
1569
by: gregory_may | last post by:
Is there any options in VS 2005 to better handle case issues in C# (Similar to VB.Net)?
1
1868
by: othellomy | last post by:
Is SQL server defaults to case insensitive? I am sure there are ways to install case sensitive SQL server instance but coming from Sybase (which is always case sensitive) case insensitivity is something new to me (it requires coding change etc). Besides, is there any option I can set to turn on case sensitivity or I am stuck with it? (I can not reinstall SQL server). Thanks.
3
4264
by: Anita Potekkat | last post by:
Hello, I had a question regarding Case Sensitivity in 10g & 9i. (1) Does Case Sensitivity in Oracle have to do with data only? Or does it also effect table & column names? For e.g. in a table NAMES with column NAME are the following queries equivalent regardless of whether case sensitivity is turned on or off. select name from names; select NAME from names; select name from NAMES; select NAME from NAMES;
2
8460
by: sweetpotatop | last post by:
Hi, I believe my SQL server was configured as Case sensitivity. I have a number of stored procedures which were moved from a non-Case sensitivity SQL server. Because of the Case sensitivity, I have to do a lot of editing in those stored procedures. Is there a quick way to avoid the editing? Something like ignoring the case in one statement?
2
7285
by: Lucky | last post by:
Hi guys, I'm having problem with case sensitive collation of SQL Database. one my client is having case sensitive database. While developing the Data Layer i didn't consider this scenario. the problem is I've all Store Procedures in the Database and I'm using sqlcommand to execute those SPs with Parameters. for e.g. Data Layer: ...... SqlCommand cmd = new SqlCommand();
0
9593
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
10343
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...
1
10335
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10088
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...
0
5529
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5668
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4306
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
3831
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3001
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.