Click here to Skip to main content
15,892,199 members
Home / Discussions / C#
   

C#

 
QuestionCross Tab Data Pin
Isaac Gordon24-Jul-09 21:03
Isaac Gordon24-Jul-09 21:03 
AnswerRe: Cross Tab Data Pin
Baran M24-Jul-09 22:22
Baran M24-Jul-09 22:22 
AnswerRe: Cross Tab Data Pin
Mycroft Holmes24-Jul-09 23:08
professionalMycroft Holmes24-Jul-09 23:08 
Questioninsert time in oracle Pin
mjawadkhatri24-Jul-09 19:28
mjawadkhatri24-Jul-09 19:28 
AnswerRe: insert time in oracle Pin
K030624-Jul-09 19:41
K030624-Jul-09 19:41 
GeneralRe: insert time in oracle Pin
mjawadkhatri24-Jul-09 19:43
mjawadkhatri24-Jul-09 19:43 
GeneralRe: insert time in oracle Pin
Baran M24-Jul-09 22:15
Baran M24-Jul-09 22:15 
QuestionCloning a class without having reference [SOLVED] Pin
Xmen Real 24-Jul-09 15:20
professional Xmen Real 24-Jul-09 15:20 
I'm tryin' to clone(not really but something like that) a class but it's members always have reference of the source. Here is an example (not exact class but an example)

public class A
{
Bitmap bitmap;

public Bitmap bitmap
{
get{ return bitmap; }
set{ bitmap = value; }
}

public void Fill(A ainst)
{
PropertyInfo[] pi = this.GetType().GetProperties();

            for (int a = 0; a < pi.Length; a++)
                pi[a].SetValue(this, pi[a].GetValue(source_SI, null), null);
}
   

}

public class B : A
{
A a_inst;

public B()
{
a_inst = new A();
}

public void Read()
{
bitmap = new Bitmap(); // any bitmap, it doesnt matter here
a_inst.Fill(this);
}
}



now, I can't write something like this
bitmap = new Bitmap(bitmap);

because that class have around 100-150 Bitmap objects and other more objects like locations and sizes. And amount of objects can be increase so I want a fix solution like even amount of objects changes it won't effect cloning(Fill()) function. Thats why I wrote above code and its working but with reference... Frown | :(

EDITED :
Well, its not creating reference. I did a little mistake in code.



TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKQUFK[M`UKs*$GwU#QDXBER@CBN%
R0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i’TV.C\y<pŠjxsg-b$f4ia>

-----------------------------------------------
128 bit encrypted signature, crack if you can

modified on Friday, July 24, 2009 10:08 PM

QuestionMultiple data sources with the same name in different directorys? [modified] Pin
Kiotaya24-Jul-09 13:46
Kiotaya24-Jul-09 13:46 
AnswerRe: Multiple data sources with the same name in different directorys? Pin
Christian Graus24-Jul-09 14:13
protectorChristian Graus24-Jul-09 14:13 
GeneralRe: Multiple data sources with the same name in different directorys? Pin
Kiotaya24-Jul-09 15:37
Kiotaya24-Jul-09 15:37 
GeneralRe: Multiple data sources with the same name in different directorys? Pin
Mycroft Holmes24-Jul-09 16:04
professionalMycroft Holmes24-Jul-09 16:04 
GeneralRe: Multiple data sources with the same name in different directorys? Pin
Kiotaya24-Jul-09 16:48
Kiotaya24-Jul-09 16:48 
GeneralRe: Multiple data sources with the same name in different directorys? Pin
Mycroft Holmes24-Jul-09 18:01
professionalMycroft Holmes24-Jul-09 18:01 
GeneralRe: Multiple data sources with the same name in different directorys? Pin
Kiotaya24-Jul-09 18:30
Kiotaya24-Jul-09 18:30 
GeneralRe: Multiple data sources with the same name in different directorys? Pin
PIEBALDconsult24-Jul-09 19:27
mvePIEBALDconsult24-Jul-09 19:27 
GeneralRe: Multiple data sources with the same name in different directorys? Pin
Kiotaya24-Jul-09 19:59
Kiotaya24-Jul-09 19:59 
GeneralRe: Multiple data sources with the same name in different directorys? Pin
Mycroft Holmes24-Jul-09 23:06
professionalMycroft Holmes24-Jul-09 23:06 
GeneralRe: Multiple data sources with the same name in different directorys? Pin
PIEBALDconsult25-Jul-09 3:46
mvePIEBALDconsult25-Jul-09 3:46 
Questionreportviewer with untyped dataset or separate datalayer Pin
redspiderke24-Jul-09 10:59
redspiderke24-Jul-09 10:59 
QuestionWhat message to look for to redraw my systray icon when explorer is killed/restarted? Pin
dandy7224-Jul-09 8:48
dandy7224-Jul-09 8:48 
AnswerRe: What message to look for to redraw my systray icon when explorer is killed/restarted? Pin
Luc Pattyn24-Jul-09 8:52
sitebuilderLuc Pattyn24-Jul-09 8:52 
GeneralRe: What message to look for to redraw my systray icon when explorer is killed/restarted? Pin
dandy7224-Jul-09 9:06
dandy7224-Jul-09 9:06 
GeneralRe: What message to look for to redraw my systray icon when explorer is killed/restarted? Pin
Ian Shlasko24-Jul-09 9:34
Ian Shlasko24-Jul-09 9:34 
GeneralRe: What message to look for to redraw my systray icon when explorer is killed/restarted? Pin
dandy7224-Jul-09 16:14
dandy7224-Jul-09 16:14 

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.