473,404 Members | 2,195 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,404 software developers and data experts.

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 1641
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.pl> wrote in message
news:df**********@atlantis.news.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@_spamkiller_bobpowell.net> wrote in message
news:OJ******************@tk2msftngp13.phx.gbl...
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.pl> wrote in message
news:df**********@atlantis.news.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.pl> 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@_spamkiller_bobpowell.net> wrote in message
news:OJ******************@tk2msftngp13.phx.gbl...
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.pl> wrote in message
news:df**********@atlantis.news.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.pl> schrieb im Newsbeitrag
news:df**********@atlantis.news.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.pl> 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
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...
761
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...
16
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...
3
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...
14
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...
15
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
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...
3
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...
2
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...
2
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.