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

Serializeable attribute and class heirarchy

UndefinedDeviceException gets serialized (throw by a remoted object and
ToString()) and is displayed by the UI. The id variable is blank as
indicated by the results of ToString(). I am missing something
rudimentary; I know it.

[Serializable]
public class UndefinedDeviceException : IAFException
{
private const string message = "This Device is not defined";
public UndefinedDeviceException(Identity id) : base(id, message) { }
public UndefinedDeviceException(SerializationInfo info,
StreamingContext context) : base (info, context) { }
}

<System.Serializable>Public Class IAFException
Inherits Exception
Protected id As String
Sub New(ByVal id As Identity, ByVal message As String)
Me.New(message)
Me.id = id.ToString()
End Sub
Sub New(ByVal message As String)
MyBase.New(message)
End Sub
Sub New(ByVal info As SerializationInfo, ByVal context As
StreamingContext)
MyBase.New(info, context)
End Sub
Public ReadOnly Property Identity(ByVal id As String)
Get
Return id
End Get
End Property
Public Overrides Function ToString() As String
Return MyBase.ToString() & System.Environment.NewLine & id
End Function
End Class
Apr 6 '06 #1
0 1955

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

Similar topics

9
by: Piotre Ugrumov | last post by:
I would have to implement a class hierarchy. The base class is the class Quadrilateral. The discendents arre th classes Trapezoid, Parallelogram, Rectangle, Square. Quadrilateral |_ Trapezoid...
17
by: Aguilar, James | last post by:
My previous example used the concept of a Shape class heirarchy, so I will continue with that. Suppose I have something like fifty different shapes, and I am trying to instantiate one of them. ...
2
by: Ilia Poliakov | last post by:
I have a following class hierarchy, but I dont know if it's right built: //------------------------------ begin of example 1 ------------------------------ class InnerClass_A { .... }; class...
4
by: Dave | last post by:
I am working on an access 2000 DB for some tree-growers that will be storing items in a heirarchy of locations. The items will obviously be stored at the lowest level in the heirarchy (in a row)...
5
by: Russell Warren | last post by:
I just ran across a case which seems like an odd exception to either what I understand as the "normal" variable lookup scheme in an instance/object heirarchy, or to the rules regarding variable...
11
by: Joseph S. | last post by:
Hi all, how do I avoid typing the keyword "$this->" every time I need to reference a member of a class inside the class? (coming from a world of cozy auto-complete enabled Java / .Net IDEs I...
8
by: kevin.vaughan | last post by:
Good Afternoon Everyone, Could someone please explain why I can't set the Subform control Visible attribute to False as below? The statement for the locked attributes work but not for the...
0
by: Brian L. Troutwine | last post by:
I've a need to pickle arbitrary class hierarchies, which, luckily, can be made to conform to the pickle protocol. At the moment, however, I'm having a rather hard time discovering which classes in...
3
by: nflacco | last post by:
Is there a convient way to do a supertype/subtype heirarchy in mysql and do queries on the supertype to return sets of subtypes? For example, suppose I have a table with several types of military...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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:
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: 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
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
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.