473,403 Members | 2,183 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.

Dynamic public property generation


I am not quite sure what I am getting into but I would like to have a loop
that read from a flat file to create some public properties in a class. I
am going after this to try and create more general software that others
could benefit from vs hardcoding things that relate only to my processes.

example property that I would want to generate:
The idea would be to read from a file that "AGE" is needed and that it is
and Integer and then to create the property in a class. This is related to
DotNetNuke 3.x

I do know one method relates to having a class that manipulates the class
file that need to be dynamic... Any thoughts on this or successful
attempts?

*************************************************
Public Property Age() As Integer
Get
Return _Age
End Get
Set(ByVal Value As Integer)
_Age = Value
If Not ObjectHydrated Then
ObjectHydrated = True
End If
End Set
End Property
**************************************************
Nov 21 '05 #1
4 1246
FunVB

Are you talking about a schoolclass, or about the class as we know it, what
is a very solid base for all OOP objects?

Cor
Nov 21 '05 #2
Could you please expand on the schoolclass topic. I am not familiar with
that but am open to all possibilities.
If you are talking specifically about DNN I have a new class that is
inheriting from DotNetNuke.Entities.Users.UserProfile
Public Class GroUserProfile
Inherits DotNetNuke.Entities.Users.UserProfile

************************************************** **************
Full Code of class I want to auto generate properties from a flat
file. specifically so it is possible for an end user to add user
attributes without haveing to recompile and edit several class files.
************************************************** **************
Namespace GRO.Users

Public Class GroUserProfile
Inherits DotNetNuke.Entities.Users.UserProfile

Private _GroLocation As String
Private _Age As Integer
Private _UserClasses As String
Private _Gender As String
Private _Registrar As String
Private _Title As String
Private _Organization As String
Public Sub New()
End Sub

Public Property GroLocation() As String
Get
Return _GroLocation
End Get
Set(ByVal Value As String)
_GroLocation = Value
If Not ObjectHydrated Then
ObjectHydrated = True
End If
End Set
End Property
Public Property Age() As Integer
Get
Return _Age
End Get
Set(ByVal Value As Integer)
_Age = Value
If Not ObjectHydrated Then
ObjectHydrated = True
End If
End Set
End Property
Public Property UserClasses() As String
Get
Return _UserClasses
End Get
Set(ByVal Value As String)
_UserClasses = Value
If Not ObjectHydrated Then
ObjectHydrated = True
End If
End Set
End Property
Public Property Gender() As String
Get
Return _Gender
End Get
Set(ByVal Value As String)
_Gender = Value
If Not ObjectHydrated Then
ObjectHydrated = True
End If
End Set
End Property
Public Property Registrar() As String
Get
Return _Registrar
End Get
Set(ByVal Value As String)
_Registrar = Value
If Not ObjectHydrated Then
ObjectHydrated = True
End If
End Set
End Property
Public Property Title() As String
Get
Return _Title
End Get
Set(ByVal Value As String)
_Title = Value
If Not ObjectHydrated Then
ObjectHydrated = True
End If
End Set
End Property
Public Property Organization() As String
Get
Return _Organization
End Get
Set(ByVal Value As String)
_Organization = Value
If Not ObjectHydrated Then
ObjectHydrated = True
End If
End Set
End Property
End Class
End Namespace


"Cor Ligthert" <no************@planet.nl> wrote in
news:u$*************@TK2MSFTNGP12.phx.gbl:
FunVB

Are you talking about a schoolclass, or about the class as we know it,
what is a very solid base for all OOP objects?

Cor


Nov 21 '05 #3

Ok this is a website for dynamic execution of code in .NET that I am
working with atm.

This is a great start but having some problems with a web project vs
windows application.
http://www.west-wind.com/presentatio...ynamiccode.htm
Dynamically executing code in .Net
By Rick Strahl
http://www.west-wind.com/
Last Update: September 8th, 2002










Nov 21 '05 #4
Fun,

You are not the first one who is busy with this. You can be the first one
who realise this correct from a point of the end-users view.

What you try to do endless done. To call some which still exist: SQL,
JavaScript, VBScript, the first generations FoxPro's, MS-Access, Excel,
hundreds or thousands or probably even more don't exist anymore.

I do not have the idea that it is handy for somebody who knows real tools,
while the end-user don't use them. There are complete developers groups now
around those so called easy solutions/languages.

You can try to find that never really good functioning developed wheel.
However I think that it is than a long lonely route to go.

However just my thought,

Cor
Nov 21 '05 #5

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

Similar topics

0
by: SlipperyCat | last post by:
I want to use the property grid to display instances of dynamic types. A problem I'm having is that the property grid is not respecting attributes that are set with SetCustomAttribute. I've taken...
3
by: MikeY | last post by:
Hi Everyone, I am working in C#, windows forms.My question is this. All my button dynamic controls properties are present and accounted for except for the"FlatStyle" properties. I can't seem to...
3
by: Guy Harwood | last post by:
Hi, I have designed a textbox that inherits from the System.Windows.Forms.Textbox control. when the control is readonly the back color changes to a light blue to indicate that it is frozen. ...
4
by: Richard Abraham | last post by:
I have created a new class ServiceTimer based upon the .NET System.Timers.Timer class. This has a new property CollectionIntervalMinutes which I expected to be added to the 'Behavior' section of the...
9
by: wASP | last post by:
Hello again to all of you geniuses, I'm having a problem trying to load dynamic controls at the initialization phase. I've read the docs, and I thought I had it figured out:...
2
by: Luis Arvayo | last post by:
Hi, In c#, I need to dynamically create types at runtime that will consist of the following: - inherits from a given interface - will have a constructor with an int argument
3
by: Dan | last post by:
Is it possible to dynamically create and populate properties? Below is my class. I would like to define properties for each of the items in my two arrays without actually defining each one. (There...
2
by: Ghada Al-Mashaqbeh via DotNetMonster.com | last post by:
Hi all, I am facing a problem in dynamic code generation at run time, the problem occurs when the dynmaic code use global data exist within the original application. Lets say that my...
2
by: =?Utf-8?B?QWFyb24=?= | last post by:
I am trying to create dynamic settings in a .NET 2.0 C# application. I need to be able to store settings on the user, but I do not know how many settings are necessary at design time because the...
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: 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: 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:
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
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...
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,...

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.