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

Need common type

6
I need a function to return something that can either be
Expand|Select|Wrap|Line Numbers
  1. System.Windows.Controls.Control
or
Expand|Select|Wrap|Line Numbers
  1. System.Windows.Controls.StackPanel
.

Ideally it should be an interface thats implemented by both or a baseclass of both of them (I hate using object for this purpose)

The likes of UIElement etc seem to be exclusive to one of 'em only.

Any ideas?
Jun 24 '11 #1
1 1880
nbiswas
149 100+
How about using an adapter design pattern ?
Jul 11 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Erwin Moller | last post by:
Hi group, I am a bit cconfused with the different tags I encounter to start a script. I used to use: language="Javascript" Nowadays I use: type="text/javascript" I did see some...
8
by: Joe | last post by:
I have a web service which returns many types (classes) to match the return type. I want to cast the return type to the actual class type. For example: namespace Test { class MyClass { ...
12
by: Mark | last post by:
I always use the word "class" to describe a class that can be instantiated. However, I don't get the concept of "Type" or at least I don't know how to use the word properly. If I have a class...
17
by: Hazz | last post by:
In this sample code of ownerdraw drawmode, why does the '(ComboBox) sender' line of code need to be there in this event handler? Isn't cboFont passed via the managed heap, not the stack, into this...
8
by: andyjgw | last post by:
Hi all, hope someone can help here, I'm really stuck. Reading and googling like mad, to no avail so far... Basically, my problem *seems* to boil down to type conversion: Here's a sample web...
1
by: Dave H | last post by:
If I pass a WebControl to a function, I want to get that controls 'type', and then loook at the other properites avaiable for that type, like ..Checked, vs .SelectedIndex. How can I get the...
1
by: Rob | last post by:
The code below is almost there (it does change the value for EVERY ORDER).... I simply want to be able to change the value of the Delivered Tag to Yes. BUT ONLY if the Order is equal to 123456 ? ...
0
by: srikar | last post by:
Please can any one tell me in Which applications we will type cast a function to another function with different parameters. please help in understanding this doubt. ...
3
by: BiGYaN | last post by:
I am not an expert in C, but from all the C code I've seen in my last 4yrs of coding in C, I observe that programmers only use only "FILE *" type and never the actual "FILE" type. So my question is...
21
by: Nikolaus Rath | last post by:
Hello, Can someone explain to me the difference between a type and a class? After reading http://www.cafepy.com/article/python_types_and_objects/ it seems to me that classes and types are...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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
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...

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.