473,756 Members | 1,870 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Inheriting a base class - Invalid Cast Exception

I am creating a set of base classes and sub classes to use throughout a
program I'm developing. The base class represents a generic "lookup
table" from my database that contains lists of things like
manufacturers, makes, modes, etc. of cars. I have created a generic
"datacollection " class and a generic "dataobject " class to represent the
table and the rows within that table as a collection of objects with
generic properties for manipulating fields, adding rows, etc.

The problem I'm having is that I have a generic "Item" method in the
DataCollection class that takes a key parameter and then looks it up in
the data table and returns the information as a "DataObject " class. I
have then written subclasses to more specifically use the base class for
a particular type of data (in the example I'm providing, a vehicle
manufacturer). So I now have a "Manufactur ers" object that inherits from
DataCollection and a "Manufactur er" object that inherits from
DataObject. So, back to my problem. In the item method, the generic
DataCollection class requires a "Key" that will be used for the lookup.
It then searches its internal data table and returns the appropriate
DataObject object. However, what I WANT, is to create an overriding Item
object in my Manufacturers object that returns a MANUFACTURER instead of
a DATAOBJECT. So I created a Public Shadows property that returns a
Manufacturer object but callse the MyBase.Item function to get it. But
MyBase.Item returns a DataObject, not a objManufactuer, and then I get
thrown my Invalid Cast Exception.

I hope that explains my predicament. Can anyone help? Here is the basics
of my code:

Public Class objDataCollecti on

Public Readonly Property Item (byval Key as Object) as
objDataObject

Get

...

Return new objDataObject(. ..)

End Get

End Property

End Class

Public Class objDataObject

..

End Class

Public Class objManufacturer s

Inherits objDataCollecti on

Public Shadows Readonly Property Item(byval Code as String)
as objManufacturer

Get

return MyBase.Item(cod e)

End Get

End Property

End Class

Public Class objManufacturer

Inherits objDataObject

..

End Class


Nov 21 '05 #1
10 2781
by using shadows, you are breaking polymorphism. Is there a reason you cant
use overrides?
"Chet Cromer" <ch*******@ccrt c.com> wrote in message
news:e0******** ******@TK2MSFTN GP14.phx.gbl...
I am creating a set of base classes and sub classes to use throughout a
program I'm developing. The base class represents a generic "lookup table"
from my database that contains lists of things like manufacturers, makes,
modes, etc. of cars. I have created a generic "datacollection " class and a
generic "dataobject " class to represent the table and the rows within that
table as a collection of objects with generic properties for manipulating
fields, adding rows, etc.

The problem I'm having is that I have a generic "Item" method in the
DataCollection class that takes a key parameter and then looks it up in
the data table and returns the information as a "DataObject " class. I have
then written subclasses to more specifically use the base class for a
particular type of data (in the example I'm providing, a vehicle
manufacturer). So I now have a "Manufactur ers" object that inherits from
DataCollection and a "Manufactur er" object that inherits from DataObject.
So, back to my problem. In the item method, the generic DataCollection
class requires a "Key" that will be used for the lookup. It then searches
its internal data table and returns the appropriate DataObject object.
However, what I WANT, is to create an overriding Item object in my
Manufacturers object that returns a MANUFACTURER instead of a DATAOBJECT.
So I created a Public Shadows property that returns a Manufacturer object
but callse the MyBase.Item function to get it. But MyBase.Item returns a
DataObject, not a objManufactuer, and then I get thrown my Invalid Cast
Exception.

I hope that explains my predicament. Can anyone help? Here is the basics
of my code:

Public Class objDataCollecti on

Public Readonly Property Item (byval Key as Object) as
objDataObject

Get

...

Return new objDataObject(. ..)

End Get

End Property

End Class

Public Class objDataObject

.

End Class

Public Class objManufacturer s

Inherits objDataCollecti on

Public Shadows Readonly Property Item(byval Code as String) as
objManufacturer

Get

return MyBase.Item(cod e)

End Get

End Property

End Class

Public Class objManufacturer

Inherits objDataObject

.

End Class



Nov 21 '05 #2
My previous response doesnt really address your question though. You are
still going to have to CType the result because you are ASKING for a generic
object by asking for it from the base class.
"Chet Cromer" <ch*******@ccrt c.com> wrote in message
news:e0******** ******@TK2MSFTN GP14.phx.gbl...
I am creating a set of base classes and sub classes to use throughout a
program I'm developing. The base class represents a generic "lookup table"
from my database that contains lists of things like manufacturers, makes,
modes, etc. of cars. I have created a generic "datacollection " class and a
generic "dataobject " class to represent the table and the rows within that
table as a collection of objects with generic properties for manipulating
fields, adding rows, etc.

The problem I'm having is that I have a generic "Item" method in the
DataCollection class that takes a key parameter and then looks it up in
the data table and returns the information as a "DataObject " class. I have
then written subclasses to more specifically use the base class for a
particular type of data (in the example I'm providing, a vehicle
manufacturer). So I now have a "Manufactur ers" object that inherits from
DataCollection and a "Manufactur er" object that inherits from DataObject.
So, back to my problem. In the item method, the generic DataCollection
class requires a "Key" that will be used for the lookup. It then searches
its internal data table and returns the appropriate DataObject object.
However, what I WANT, is to create an overriding Item object in my
Manufacturers object that returns a MANUFACTURER instead of a DATAOBJECT.
So I created a Public Shadows property that returns a Manufacturer object
but callse the MyBase.Item function to get it. But MyBase.Item returns a
DataObject, not a objManufactuer, and then I get thrown my Invalid Cast
Exception.

I hope that explains my predicament. Can anyone help? Here is the basics
of my code:

Public Class objDataCollecti on

Public Readonly Property Item (byval Key as Object) as
objDataObject

Get

...

Return new objDataObject(. ..)

End Get

End Property

End Class

Public Class objDataObject

.

End Class

Public Class objManufacturer s

Inherits objDataCollecti on

Public Shadows Readonly Property Item(byval Code as String) as
objManufacturer

Get

return MyBase.Item(cod e)

End Get

End Property

End Class

Public Class objManufacturer

Inherits objDataObject

.

End Class



Nov 21 '05 #3
Scratch that, you can't ctype a base class to its derived type. You have to
override the Item property in the derived class and implement it to return
the type you wanted to return. You cant return a speficic type (or more
specifically, cant return several different specific types) from a single
base class.
"Rick Mogstad" <Ri**********@G Mail.NOSPAM.com > wrote in message
news:Oa******** ******@TK2MSFTN GP14.phx.gbl...
My previous response doesnt really address your question though. You are
still going to have to CType the result because you are ASKING for a
generic object by asking for it from the base class.
"Chet Cromer" <ch*******@ccrt c.com> wrote in message
news:e0******** ******@TK2MSFTN GP14.phx.gbl...
I am creating a set of base classes and sub classes to use throughout a
program I'm developing. The base class represents a generic "lookup table"
from my database that contains lists of things like manufacturers, makes,
modes, etc. of cars. I have created a generic "datacollection " class and a
generic "dataobject " class to represent the table and the rows within that
table as a collection of objects with generic properties for manipulating
fields, adding rows, etc.

The problem I'm having is that I have a generic "Item" method in the
DataCollection class that takes a key parameter and then looks it up in
the data table and returns the information as a "DataObject " class. I
have then written subclasses to more specifically use the base class for
a particular type of data (in the example I'm providing, a vehicle
manufacturer). So I now have a "Manufactur ers" object that inherits from
DataCollection and a "Manufactur er" object that inherits from DataObject.
So, back to my problem. In the item method, the generic DataCollection
class requires a "Key" that will be used for the lookup. It then searches
its internal data table and returns the appropriate DataObject object.
However, what I WANT, is to create an overriding Item object in my
Manufacturers object that returns a MANUFACTURER instead of a DATAOBJECT.
So I created a Public Shadows property that returns a Manufacturer object
but callse the MyBase.Item function to get it. But MyBase.Item returns a
DataObject, not a objManufactuer, and then I get thrown my Invalid Cast
Exception.

I hope that explains my predicament. Can anyone help? Here is the basics
of my code:

Public Class objDataCollecti on

Public Readonly Property Item (byval Key as Object) as
objDataObject

Get

...

Return new objDataObject(. ..)

End Get

End Property

End Class

Public Class objDataObject

.

End Class

Public Class objManufacturer s

Inherits objDataCollecti on

Public Shadows Readonly Property Item(byval Code as String) as
objManufacturer

Get

return MyBase.Item(cod e)

End Get

End Property

End Class

Public Class objManufacturer

Inherits objDataObject

.

End Class




Nov 21 '05 #4

Write a constructor for objManufacturer that accepts a objDataObject;
then in objManufacturer s.Item, do this:

Public Shadows Readonly Property Item(byval Code as String) as
objManufacturer
Get
return New objManufacturer (MyBase.Item(co de))
End Get
End Property

Your problem is this (and I agree it might seem non-intuitive): if you
want to specialise an object (ie make a derived-class object from a
base-class object), you must *explicitly* specify how to do it, by
means of an appropriate constructor or otherwise. That is, using the
usual OO example, you CAN'T say

Dim a as Animal = New Animal
Dim d as Dog = a ' nuh uh!

without somewhere saying exactly how you want to make a Dog from an
Animal. It's a similar idea to the way that constructors can't be
inherited - when you specialise you take on the burden of explaining
the specialisation.

Chet Cromer wrote:
I am creating a set of base classes and sub classes to use throughout a
program I'm developing. The base class represents a generic "lookup
table" from my database that contains lists of things like
manufacturers, makes, modes, etc. of cars. I have created a generic
"datacollection " class and a generic "dataobject " class to represent the
table and the rows within that table as a collection of objects with
generic properties for manipulating fields, adding rows, etc.

The problem I'm having is that I have a generic "Item" method in the
DataCollection class that takes a key parameter and then looks it up in
the data table and returns the information as a "DataObject " class. I
have then written subclasses to more specifically use the base class for
a particular type of data (in the example I'm providing, a vehicle
manufacturer). So I now have a "Manufactur ers" object that inherits from
DataCollection and a "Manufactur er" object that inherits from
DataObject. So, back to my problem. In the item method, the generic
DataCollection class requires a "Key" that will be used for the lookup.
It then searches its internal data table and returns the appropriate
DataObject object. However, what I WANT, is to create an overriding Item
object in my Manufacturers object that returns a MANUFACTURER instead of
a DATAOBJECT. So I created a Public Shadows property that returns a
Manufacturer object but callse the MyBase.Item function to get it. But
MyBase.Item returns a DataObject, not a objManufactuer, and then I get
thrown my Invalid Cast Exception.

I hope that explains my predicament. Can anyone help? Here is the basics
of my code:

Public Class objDataCollecti on

Public Readonly Property Item (byval Key as Object) as
objDataObject

Get

...

Return new objDataObject(. ..)

End Get

End Property

End Class

Public Class objDataObject

.

End Class

Public Class objManufacturer s

Inherits objDataCollecti on

Public Shadows Readonly Property Item(byval Code as String)
as objManufacturer

Get

return MyBase.Item(cod e)

End Get

End Property

End Class

Public Class objManufacturer

Inherits objDataObject

.

End Class


Nov 21 '05 #5
I used shadows because my Item property in Manufacturers class takes a
string (because I know the unique key is a string value), while the Item
property in the DataCollection class takes an object, because I want to
use it for various tables, some that have numeric keys, and some that
have string keys. If I change the DataCollection item class to take a
string key (which I could do), I then can do an OverRides property, but
like you said, that doesn't fix my problem.

In the Item property of my Manufacturers class, I tried using CType
already in this manner:
Return CType(MyBase.It em(Code), objManufacturer )

Is there somewhere else I should be using this line of code?

"Rick Mogstad" <Ri**********@G Mail.NOSPAM.com > wrote in message
news:Ri******** **@GMail.NOSPAM .com:
My previous response doesnt really address your question though. You are
still going to have to CType the result because you are ASKING for a generic
object by asking for it from the base class.
"Chet Cromer" <ch*******@ccrt c.com> wrote in message
news:e0******** ******@TK2MSFTN GP14.phx.gbl...
I am creating a set of base classes and sub classes to use throughout a
program I'm developing. The base class represents a generic "lookup table"
from my database that contains lists of things like manufacturers, makes,
modes, etc. of cars. I have created a generic "datacollection " class and a
generic "dataobject " class to represent the table and the rows within that
table as a collection of objects with generic properties for manipulating
fields, adding rows, etc.

The problem I'm having is that I have a generic "Item" method in the
DataCollection class that takes a key parameter and then looks it up in
the data table and returns the information as a "DataObject " class. I have
then written subclasses to more specifically use the base class for a
particular type of data (in the example I'm providing, a vehicle
manufacturer). So I now have a "Manufactur ers" object that inherits from
DataCollection and a "Manufactur er" object that inherits from DataObject.
So, back to my problem. In the item method, the generic DataCollection
class requires a "Key" that will be used for the lookup. It then searches
its internal data table and returns the appropriate DataObject object.
However, what I WANT, is to create an overriding Item object in my
Manufacturers object that returns a MANUFACTURER instead of a DATAOBJECT.
So I created a Public Shadows property that returns a Manufacturer object
but callse the MyBase.Item function to get it. But MyBase.Item returns a
DataObject, not a objManufactuer, and then I get thrown my Invalid Cast
Exception.

I hope that explains my predicament. Can anyone help? Here is the basics
of my code:

Public Class objDataCollecti on

Public Readonly Property Item (byval Key as Object) as
objDataObject

Get

...

Return new objDataObject(. ..)

End Get

End Property

End Class

Public Class objDataObject

.

End Class

Public Class objManufacturer s

Inherits objDataCollecti on

Public Shadows Readonly Property Item(byval Code as String) as
objManufacturer

Get

return MyBase.Item(cod e)

End Get

End Property

End Class

Public Class objManufacturer

Inherits objDataObject

.

End Class




Nov 21 '05 #6

"Chet Cromer" <ch*******@ccrt c.com> wrote in message
news:uD******** ******@TK2MSFTN GP15.phx.gbl...
I used shadows because my Item property in Manufacturers class takes a
string (because I know the unique key is a string value), while the Item
property in the DataCollection class takes an object, because I want to use
it for various tables, some that have numeric keys, and some that have
string keys. If I change the DataCollection item class to take a string key
(which I could do), I then can do an OverRides property, but like you said,
that doesn't fix my problem.

In the Item property of my Manufacturers class, I tried using CType
already in this manner:
Return CType(MyBase.It em(Code), objManufacturer )

Is there somewhere else I should be using this line of code?

Larry has pointed out why your aproach wont work, but it still seems more
practical to make the base Item property overridable, then make your derived
Item Property 'Overloads Overrides' to make it a string. This really only
applies if you plan to pass around your derived class as the base class type
however, so if you are sure you are never going to do that, then feel free
to use shadows.
Nov 21 '05 #7
That makes sense, and that was how I was visualizing it, but couldn't
think where to put the code. I tried that out (I made another
constructor for my Manufacturer object that takes a DataObject).

THANK YOU!

Chet
"Larry Lard" <la*******@hotm ail.com> wrote in message
news:la*******@ hotmail.com:
Write a constructor for objManufacturer that accepts a objDataObject;
then in objManufacturer s.Item, do this:

Public Shadows Readonly Property Item(byval Code as String) as
objManufacturer
Get
return New objManufacturer (MyBase.Item(co de))
End Get
End Property

Your problem is this (and I agree it might seem non-intuitive): if you
want to specialise an object (ie make a derived-class object from a
base-class object), you must *explicitly* specify how to do it, by
means of an appropriate constructor or otherwise. That is, using the
usual OO example, you CAN'T say

Dim a as Animal = New Animal
Dim d as Dog = a ' nuh uh!

without somewhere saying exactly how you want to make a Dog from an
Animal. It's a similar idea to the way that constructors can't be
inherited - when you specialise you take on the burden of explaining
the specialisation.

Chet Cromer wrote:
I am creating a set of base classes and sub classes to use throughout a
program I'm developing. The base class represents a generic "lookup
table" from my database that contains lists of things like
manufacturers, makes, modes, etc. of cars. I have created a generic
"datacollection " class and a generic "dataobject " class to represent the
table and the rows within that table as a collection of objects with
generic properties for manipulating fields, adding rows, etc.

The problem I'm having is that I have a generic "Item" method in the
DataCollection class that takes a key parameter and then looks it up in
the data table and returns the information as a "DataObject " class. I
have then written subclasses to more specifically use the base class for
a particular type of data (in the example I'm providing, a vehicle
manufacturer). So I now have a "Manufactur ers" object that inherits from
DataCollection and a "Manufactur er" object that inherits from
DataObject. So, back to my problem. In the item method, the generic
DataCollection class requires a "Key" that will be used for the lookup.
It then searches its internal data table and returns the appropriate
DataObject object. However, what I WANT, is to create an overriding Item
object in my Manufacturers object that returns a MANUFACTURER instead of
a DATAOBJECT. So I created a Public Shadows property that returns a
Manufacturer object but callse the MyBase.Item function to get it. But
MyBase.Item returns a DataObject, not a objManufactuer, and then I get
thrown my Invalid Cast Exception.

I hope that explains my predicament. Can anyone help? Here is the basics
of my code:

Public Class objDataCollecti on

Public Readonly Property Item (byval Key as Object) as
objDataObject

Get

...

Return new objDataObject(. ..)

End Get

End Property

End Class

Public Class objDataObject

.

End Class

Public Class objManufacturer s

Inherits objDataCollecti on

Public Shadows Readonly Property Item(byval Code as String)
as objManufacturer

Get

return MyBase.Item(cod e)

End Get

End Property

End Class

Public Class objManufacturer

Inherits objDataObject

.

End Class


Nov 21 '05 #8
And another reason I can't (I think) use overrides is that the Item
property of a Manufacturers object returns a Manufacturer, while the
Item property of a DataCollection object returns a DataObject. When I
used overrides it told me I had to return the same type of data; is
there a way around these two obstacles so I don't have to break
Polymorphism?

The Manufactuers Item property needs to look like this:
Public Readonly Property Item (Key as string) as Manufacturer

I know the Key is a string, and I want to return a Manufacturer class

And the generic DataCollection Item property needs to look like this:
Public Readonly Property Item (Key as object) as DataObject

I could easily get around the Key as object issue by writing several
different Item properties (StringKey as String), (NumericKey as
Integer), etc., but I still have the issue of the type of my returned
object, don't I?


"Chet Cromer" <ch*******@ccrt c.com> wrote in message
news:ch*******@ ccrtc.com:
I used shadows because my Item property in Manufacturers class takes a
string (because I know the unique key is a string value), while the Item
property in the DataCollection class takes an object, because I want to
use it for various tables, some that have numeric keys, and some that
have string keys. If I change the DataCollection item class to take a
string key (which I could do), I then can do an OverRides property, but
like you said, that doesn't fix my problem.

In the Item property of my Manufacturers class, I tried using CType
already in this manner:
Return CType(MyBase.It em(Code), objManufacturer )

Is there somewhere else I should be using this line of code?

"Rick Mogstad" <Ri**********@G Mail.NOSPAM.com > wrote in message
news:Ri******** **@GMail.NOSPAM .com:

My previous response doesnt really address your question though. You are
still going to have to CType the result because you are ASKING for a generic
object by asking for it from the base class.
"Chet Cromer" <ch*******@ccrt c.com> wrote in message
news:e0******** ******@TK2MSFTN GP14.phx.gbl...

I am creating a set of base classes and sub classes to use throughout a
program I'm developing. The base class represents a generic "lookup table"
from my database that contains lists of things like manufacturers, makes,
modes, etc. of cars. I have created a generic "datacollection " class and a
generic "dataobject " class to represent the table and the rows within that
table as a collection of objects with generic properties for manipulating
fields, adding rows, etc.

The problem I'm having is that I have a generic "Item" method in the
DataCollection class that takes a key parameter and then looks it up in
the data table and returns the information as a "DataObject " class. I have
then written subclasses to more specifically use the base class for a
particular type of data (in the example I'm providing, a vehicle
manufacturer). So I now have a "Manufactur ers" object that inherits from
DataCollection and a "Manufactur er" object that inherits from DataObject.
So, back to my problem. In the item method, the generic DataCollection
class requires a "Key" that will be used for the lookup. It then searches
its internal data table and returns the appropriate DataObject object.
However, what I WANT, is to create an overriding Item object in my
Manufacturers object that returns a MANUFACTURER instead of a DATAOBJECT.
So I created a Public Shadows property that returns a Manufacturer object
but callse the MyBase.Item function to get it. But MyBase.Item returns a
DataObject, not a objManufactuer, and then I get thrown my Invalid Cast
Exception.

I hope that explains my predicament. Can anyone help? Here is the basics
of my code:

Public Class objDataCollecti on

Public Readonly Property Item (byval Key as Object) as
objDataObject

Get

...

Return new objDataObject(. ..)

End Get

End Property

End Class

Public Class objDataObject

.

End Class

Public Class objManufacturer s

Inherits objDataCollecti on

Public Shadows Readonly Property Item(byval Code as String) as
objManufacturer

Get

return MyBase.Item(cod e)

End Get

End Property

End Class

Public Class objManufacturer

Inherits objDataObject

.

End Class




Nov 21 '05 #9
I won't be passing the classes around as a base class. The base class is
just there to simplify most of the data access code, collection
handling, and things like that. When I pass objects around I'll always
be passing around the subclasses.

And I tried changing to Overloads Overrides but still get the following
error:

'objManufacture r' cannot override 'Public ReadOnly Default Property
Item(Key As String) As objDataClassObj ect' because they differ by their
return types."

I think I'm good, thank you both for your help.

"Rick Mogstad" <Ri**********@G Mail.NOSPAM.com > wrote in message
news:Ri******** **@GMail.NOSPAM .com:
"Chet Cromer" <ch*******@ccrt c.com> wrote in message
news:uD******** ******@TK2MSFTN GP15.phx.gbl...
I used shadows because my Item property in Manufacturers class takes a
string (because I know the unique key is a string value), while the Item
property in the DataCollection class takes an object, because I want to use
it for various tables, some that have numeric keys, and some that have
string keys. If I change the DataCollection item class to take a string key
(which I could do), I then can do an OverRides property, but like you said,
that doesn't fix my problem.

In the Item property of my Manufacturers class, I tried using CType
already in this manner:
Return CType(MyBase.It em(Code), objManufacturer )

Is there somewhere else I should be using this line of code?


Larry has pointed out why your aproach wont work, but it still seems more
practical to make the base Item property overridable, then make your derived
Item Property 'Overloads Overrides' to make it a string. This really only
applies if you plan to pass around your derived class as the base class type
however, so if you are sure you are never going to do that, then feel free
to use shadows.


Nov 21 '05 #10

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

Similar topics

7
1423
by: Ray Gardener | last post by:
C++ doesn't allow: class counter : public int {}; Was there any special reason why base class ids can only be struct/class ids? This limitation appears to violate the concept of uniform type conceptualization; i.e. classes can never have or extend an is-a relationship to a scalar.
11
2168
by: Noah Coad [MVP .NET/C#] | last post by:
How do you make a member of a class mandatory to override with a _new_ definition? For example, when inheriting from System.Collections.CollectionBase, you are required to implement certain methods, such as public void Add(MyClass c). How can I enforce the same behavior (of requiring to implement a member with a new return type in an inherited class) in the master class (similar to the CollectionBase)? I have a class called...
3
2523
by: sureshsundar007 | last post by:
Hi all, I'm trying to inherit the SimpleWorkerRequest class but cant able to do so. I'm getting an error called "System.Web.Hosting.SimpleWorkerRequest.SimpleWorkerRequest()' is inaccessible due to its protection level" I tried my dervived class with public,internal and private
3
5462
by: Rob Richardson | last post by:
Greetings! I am trying to make it possible for new derived classes of an object to be used by my application without rebuilding the application. The new classes will be made known to my application by storing the file name, assembly name and class name for them in a database. The code to create an instance of the object will look something like the following: Assembly asm = Assembly.LoadFrom(derivedFileName); Type derivedType =...
5
15237
by: Chris Capon | last post by:
Is there any way to cast a base class object to a derived class datatype when the derived class adds no new fields nor alters the object allocation in any way? The scenario would be where you want to extend a base class by adding only methods and properties, however, only base class objects are provided to you. Here is a sample: public class Base
10
1748
by: Brett Romero | last post by:
Say I have a class inheriting some base class: BaseClass { void Foo() { Update(); } }
0
2146
by: robert | last post by:
Hi all, I'm having a hard time resolving a namespace issue in my wsdl. Here's an element that explains my question, with the full wsdl below: <definitions name="MaragatoService" targetNamespace="http://swaMaragatoNS" xmlns:tns="http://swaMaragatoNS" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
24
39161
by: AtariPete | last post by:
Hey All, I have a C# question for you regarding up casting (base to derived). I was wondering about the most elegant way (readable, less code) to cast from a base type to its derived type. Please consider the following two classes: class Base { private int m_valA;
12
2166
by: =?Utf-8?B?RXRoYW4gU3RyYXVzcw==?= | last post by:
Hi, I have a class which "BiologySequence" which looks about like this. public class BiologySequence { private string _Sequence; public string Sequence {
0
9455
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
9271
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,...
1
9838
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
9708
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
8709
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7242
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
5140
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...
1
3805
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
3
2665
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.