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

Define a class using an XML file?

Dear Sirs,

I'm looking for a way to define a class using an XML file. Since I'm
building a Web Service to be used by several customers I want to be able to
easily change the class below without having to change the actual code. This
class is also used in the communication with the customer's SQL server.

Thanks for any kind of help.

Regards,
Jonah Olsson

Public Class MemberData

Private _EmailGUID As String
Private _Email As String
Private _FirstName As String
Private _LastName As String
Private _Title As String
Private _Company As String
Private _Address As String
Private _PostalCode As Integer
Private _City As String
Private _Phone As String
Private _Active As Integer
Private _RegDate As DateTime
Private _ChangeDate As DateTime
Private _SoftBounces As Integer
Private _HardBounces As Integer
Private _GroupIDs As String

Public Sub New()
MyBase.New()

_EmailGUID = ""
_Email = ""
_FirstName = ""
_LastName = ""
_Title = ""
_Company = ""
_Address = ""
_PostalCode = 0
_City = ""
_Phone = ""
_Active = 0
_RegDate = Nothing
_ChangeDate = Nothing
_GroupIDs = ""

End Sub

Public Property EmailGUID() As String
Get
Return _EmailGUID
End Get
Set(ByVal Value As String)
If ((Value Is Nothing) OrElse (Value.Length = 0)) Then
Throw New Exception("The email address identifier cannot be
empty")
End If
_EmailGUID = Value
End Set
End Property

Public Property Email() As String
Get
Return _Email
End Get
Set(ByVal Value As String)
If ((Value Is Nothing) OrElse (Value.Length = 0)) Then
Throw New Exception("The email address cannot be empty")
End If
_Email = Value
End Set
End Property

[...]

End Class

Nov 17 '05 #1
0 1143

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

Similar topics

0
by: Bill Davy | last post by:
I am working with MSVC6 on Windows XP. I have created an MSVC project called SHIP I have a file SHIP.i with "%module SHIP" as the first line (file is below). I run SHIP.i through SWIG 1.3.24...
5
by: DrUg13 | last post by:
#ifndef HEADER_H #define HEADER_H blah blal #endif So this tells the compiler That if its defined do not define it again. Could someone help me understand this. Does this mean that if I...
97
by: s | last post by:
Can I do this: #define MYSTRING "ABC" .. .. .. char mychar = MYSTRING; .. .. ..
14
by: Blue Ocean | last post by:
My c++ text tells me that I should define methods this way: class Stack { int method(double t); Stack(int s); ... } int Stack::method(double t)
4
by: oliver.lin | last post by:
In my simple test code, I tried to define my constructor outside of the class declaration headr file. The header file: file_handler.h ============================================================...
7
by: Don Wash | last post by:
Hi There! I'm trying to define constants so that I can refer those constants from any page of my ASP.NET website. I know I can use <appSettings> in web.config XML file but I don't want to parse...
10
by: Brett | last post by:
If I have many hard coded values such as file paths, file names, timeouts, etc, where is the best place to define them? Meaning, in the case something needs changing for example, rather than...
7
by: aaragon | last post by:
Hi everyone, I have a simple question. I'm trying to make a macro in one file so I can use it in main.cpp. The idea is that I the user of my code has simple to type the macro definition to replace...
5
by: alan | last post by:
Hello world, I'm wondering if it's possible to implement some sort of class/object that can perform mapping from class types to strings? I will know the class type at compile time, like so:...
5
by: Timothy Madden | last post by:
Hy static members of non-integral type need to be declared in the class, but defined (and constructed or initialized) outside the class. Like this class SystemName { public:
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
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,...
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
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...
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,...
0
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...

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.