473,387 Members | 1,678 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,387 software developers and data experts.

Is the difference intended?

Hi.
Recently, when I was designing myown buttonbar and a designer
serialization(typeconverter) for its button collection I've slipped on
construction like this:

If TypeOf value Is Field Then

It occured that sometimes it is not even if in Else i msgboxed it
(value.ToString) and it said ButtonBarControl.Field.

So i changed it to something like this:
If Type.Equals(value.GetType, GetType(Field)) Then
and this one above works perfectly.

I wonder what's the difference and is it indeed intened.

Best regards,
Doker

Sep 5 '06 #1
2 992
After further inquiery i see that the same happens with both lines.
Why and when an object X of type A isnot of type A?

Sep 5 '06 #2
AFAIK TypeOf also takes inheritance into account (that is if B inherits from
A Then TypeOf BVar Is A is true).

Could it be your problem ? Simple repro ?

--
Patrice

<do****@wp.pla écrit dans le message de news:
11*********************@i3g2000cwc.googlegroups.co m...
After further inquiery i see that the same happens with both lines.
Why and when an object X of type A isnot of type A?

Sep 5 '06 #3

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

Similar topics

9
by: jlopes | last post by:
I'm looking at the differences between these to forms and see no difference in their use. When accessed through a derived class. class ABase { public: virtual void filter(){ /* some code */ }...
4
by: JJ_377 | last post by:
Why won't Netscape do the intended in the following? IE is able to render this page as intended. It is is a "self-posting" ASP form with a JavaScript validation function: if the form fails the...
2
by: John | last post by:
Hi I am trying to find difference between two time values in hours. I have tried the following? ? dateDiff("h", #23:00:00#, #23:00:00#) gives 0 as expected. ? dateDiff("h", #00:00:00#,...
5
by: WindAndWaves | last post by:
Greetings once more, I was wondering if someone figured out the difference between attributes and properties. I noticed that things like fields have a number of properties, but also...
10
by: Jon Davis | last post by:
I've been using the ref keyword as a way of passing strings to methods as references so that in the method I don't have to manually return the modified "version" of what was passed into the method,...
34
by: arnuld | last post by:
what is the difference between these 2: char name = "hackers"; char* name = "hackers";
5
by: _mario.lat | last post by:
hallo, I'd like to understand the difference between socktype ad protocol: in getaddrinfo or in cration of socket we have two arguments: socketype and protocol: ai_socktype: can have...
7
by: coolsti | last post by:
I have just noticed a very large difference in memory usage for the PHP applications that I have developed for my company between my developmental machine and the "production" machine: Development...
15
by: student4lifer | last post by:
Hello, I have 2 time fields dynamically generated in format "m/d/y H:m". Could someone show me a good function to calculate the time interval difference in minutes? I played with strtotime() but...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
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,...

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.