Click here to Skip to main content
15,887,293 members
Home / Discussions / C#
   

C#

 
GeneralRe: How can I hide notify icons programmatically? Pin
Giorgi Dalakishvili9-Jun-08 1:03
mentorGiorgi Dalakishvili9-Jun-08 1:03 
QuestionDriveInfo - Removing a drive entry. Pin
Jammer7-Jun-08 12:28
Jammer7-Jun-08 12:28 
AnswerRe: DriveInfo - Removing a drive entry. Pin
Jammer7-Jun-08 12:48
Jammer7-Jun-08 12:48 
GeneralRe: DriveInfo - Removing a drive entry. Pin
User 66587-Jun-08 23:29
User 66587-Jun-08 23:29 
GeneralRe: DriveInfo - Removing a drive entry. Pin
Jammer8-Jun-08 0:10
Jammer8-Jun-08 0:10 
QuestionDatatable rows check Pin
NewToAspDotNet7-Jun-08 10:14
NewToAspDotNet7-Jun-08 10:14 
AnswerRe: Datatable rows check Pin
Gareth H7-Jun-08 10:22
Gareth H7-Jun-08 10:22 
GeneralReflection or Serialization Pin
sourceisnothere7-Jun-08 9:14
sourceisnothere7-Jun-08 9:14 
I want to build a small utility using c# where I have to construct a hash table from any given object's properties . Say for example if a class is something like this

namespace my.project
{
using System.Runtime.Serialization;
using System.Collections.Generic;

[Serializable]
public class A: MySuper
{
public A()
{
}

private int _id;
private string _name;
private B _b;

public int ID
{
get { return _id; }
set { _id = value; }
}

public string Name
{
get { return _name; }
set { _name = value; }
}

public B B
{
get { return _b; }
set { _b = value; }
}

............

Now the hashtable should be like

Key Value
-- -------
id 12
name Robert
ABid 11

BC[0]id 12 //in case b has a list of c and c has a property id
BC[1]id 14
..........
...........

I was able to construct the hash map using reflection for any simple objects like A having only name and id. But in real word A might have B and B might have a List of C. So I guess I have get the property value using recursion and reflection.


Can any one suggest a better way to crate the above hash table maybe using serialization.
GeneralRe: Reflection or Serialization Pin
User 66587-Jun-08 9:51
User 66587-Jun-08 9:51 
GeneralRe: Reflection or Serialization Pin
sourceisnothere7-Jun-08 10:42
sourceisnothere7-Jun-08 10:42 
QuestionAn other image processing Pin
Sajjad Izadi7-Jun-08 8:46
Sajjad Izadi7-Jun-08 8:46 
AnswerRe: An other image processing Pin
User 66587-Jun-08 9:25
User 66587-Jun-08 9:25 
GeneralRe: An other image processing Pin
Sajjad Izadi7-Jun-08 9:32
Sajjad Izadi7-Jun-08 9:32 
GeneralRe: An other image processing Pin
User 66587-Jun-08 9:36
User 66587-Jun-08 9:36 
QuestionImage processing Pin
Sajjad Izadi7-Jun-08 7:13
Sajjad Izadi7-Jun-08 7:13 
AnswerRe: Image processing Pin
Kristian Sixhøj7-Jun-08 7:18
Kristian Sixhøj7-Jun-08 7:18 
GeneralRe: Image processing Pin
Sajjad Izadi7-Jun-08 8:27
Sajjad Izadi7-Jun-08 8:27 
AnswerRe: Image processing Pin
User 66587-Jun-08 8:12
User 66587-Jun-08 8:12 
QuestionRe: Image processing Pin
Sajjad Izadi7-Jun-08 8:34
Sajjad Izadi7-Jun-08 8:34 
AnswerRe: Image processing Pin
User 66587-Jun-08 8:43
User 66587-Jun-08 8:43 
GeneralRe: Image processing Pin
Sajjad Izadi7-Jun-08 8:54
Sajjad Izadi7-Jun-08 8:54 
Questionwhat is the current screen resolution? Pin
Sajjad Izadi7-Jun-08 5:55
Sajjad Izadi7-Jun-08 5:55 
AnswerRe: what is the current screen resolution? Pin
Christian Graus7-Jun-08 6:21
protectorChristian Graus7-Jun-08 6:21 
GeneralRe: what is the current screen resolution? Pin
Sajjad Izadi7-Jun-08 7:14
Sajjad Izadi7-Jun-08 7:14 
QuestionSpell check word highlighting problem... Pin
sagedread7-Jun-08 5:11
sagedread7-Jun-08 5:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.