473,659 Members | 2,839 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1264
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.Enti ties.Users.User Profile
Public Class GroUserProfile
Inherits DotNetNuke.Enti ties.Users.User Profile

*************** *************** *************** *************** ****
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.Enti ties.Users.User Profile

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$******** *****@TK2MSFTNG P12.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
1567
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 an example from MSDN and added a few lines to set the CateoryAttribute of my property. Unfortunetly it still comes up as misc. What's wrong with this sample? public static Assembly DefineDynamicAssembly(AppDomain domain) { // Build a...
3
6819
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 figure out, if there is a way of using polymorphic way (if that is a word) of doing this particular property. A sample of my code is as follows: DynamicControls.ButtonControl(this,btnSearchByName, new Point(5, 75), new Size(95, 20),...
3
13709
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. This all works well, but i would like the color to be configurable via the app.config file.
4
3371
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 class properties and also to be available as a 'Dynamic' property so that I could control it from the application config file. The new property is not shown, but the properties inherited from the base class are I cannot find any reference to how...
9
17618
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: <>-<>-<>-<>-<>-<>-<>-<>-<>-<>-<>-<> <>-<>-<>-<>-<>-<>-<>-<>-<>-<>-<>-<> .NET Framework Class Library Control.Init Event
2
3632
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
1940
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 are over 100 in total). I would to have them set up the same as i have "form_id" below, but im not sure what the syntax to do it is (without actually typing each one). ' declare form_id private form_id
2
3077
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 application is called "Dynamic Code", so the name space in my project is "Dynamic Code", I have created "Form1.cs" where my code exist. Form1 class contain a global class "xarray" with static memeber "x" which is an array, I want the added dynamic code by...
2
10054
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 settings are determined by a business object that is loaded into the app of which there could be one or many. I would prefer to use the same LocalFileSettingsProvider that the settings default to so that I do not have to manage it myself. Here...
0
8427
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
8332
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,...
0
8746
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8627
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
7356
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...
0
4175
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
2750
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
2
1975
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1737
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.