I have a number of classes that inherits from a baseclass.
The normal way to populate the object is to send it a DataRow containing the information needed.
But now I need a function that returns an ArrayList of objects that are derived from the baseclass. The function is not, nor can it be, in...
One option would be to declare them as sql-types instead, as the reason I want this is to map an object onto a DB table.
(You could simply map the key name to the row-column name property.)
Do you know how well sql-types perform memorywise and speedwise compared to valuetypes?
The problem I'd like to solve is to map a value type to a value in a hashtable in managed code.
public class testbase
{
protected HashTable ht = new HashTable();
}
public class test : testbase
{
string _aString;
int _aInt;
public test()
{
ht["aString"] = _aString...
This doesn't quite answer my question.
A member function requires that you instansiate an object before using it. If the method is derived from a baseclass it can be overridden from that class, but the same isn't true if the function is static.
I've got a baseclass vith a number of functions...
Declaring a member function as abstract static generates a compile error, "A static member cannot be marked as override, virtual, or abstract".
Why is it a bad thing to declare a function like this?
Actually I made a mistake... [doh]
It helps if the object given in the typeof() declaration is the same object you are trying to serialize... :-)
Thnx anyways!!!
Hi!
I'd like to serialize an object from within itself.
public class person
{
public int id = 5;
public ArrayList phoneNumbers;
...
public void Serialize (string filename)
{
//Code to serialize current object
}
}
the code
XmlSerializer serializer = new...
I have an arraylist of objects where I need to run an execution function for each diffrent object at a diffrent time.
Sofar I've been leaning towards solving it with a timer that iterates through the objects and checks if System.DateTime.Now() > obj.ExecutionDate
It feels however like sloppy...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.