Click here to Skip to main content
15,909,953 members
Home / Discussions / C#
   

C#

 
GeneralRe: how to cast string with characters to int Pin
Bahaa Hany12-Jun-07 4:36
Bahaa Hany12-Jun-07 4:36 
GeneralRe: how to cast string with characters to int Pin
Luc Pattyn12-Jun-07 4:59
sitebuilderLuc Pattyn12-Jun-07 4:59 
GeneralRe: how to cast string with characters to int Pin
Guffa14-Jun-07 11:27
Guffa14-Jun-07 11:27 
GeneralRe: how to cast string with characters to int Pin
Luc Pattyn14-Jun-07 12:07
sitebuilderLuc Pattyn14-Jun-07 12:07 
QuestionC# Member initialization question Pin
jayart12-Jun-07 4:12
jayart12-Jun-07 4:12 
AnswerRe: C# Member initialization question Pin
Luc Pattyn12-Jun-07 4:23
sitebuilderLuc Pattyn12-Jun-07 4:23 
GeneralRe: C# Member initialization question Pin
jayart12-Jun-07 4:43
jayart12-Jun-07 4:43 
GeneralRe: C# Member initialization question Pin
Luc Pattyn12-Jun-07 5:09
sitebuilderLuc Pattyn12-Jun-07 5:09 
ArtiGujare wrote:
Confusion-A) The designer of MyClass1 opens fine even if 1) or 2) is used.


That's good.


ArtiGujare wrote:
Confusion-B) assuming I use method 2)


OK, I am not sure but this is what I expect is happening:
- the line private Class2 _obj=null; does not do much: it reserves a 4 (or 8) byte
reference which is defaulted to zero; it does not need to know what Class2 actually is,
so the compiler will insist on knowing Class2, but at run-time Class2 is not needed,
since there is no code corresponding to this line.
- the line _obj=null; in the constructor is assigning to a variable of type Class2; at
run-time this is the first time Class2 is referenced, so the JIT will try to load and
compile it (although the statement does not require any knowledge of Class2, by definition
this is when Class2 needs to get initialized). Now at design time (which also runs the
constructor), it will fail to find the dll containing Class2 since it searches relative
to the location of Visual itself, not your project. This I guess is the issue you must
solve, but no I do not know how.

Hope this helps.

Smile | :)




QuestionStringFormat..Trimming Pin
Gareth H12-Jun-07 3:22
Gareth H12-Jun-07 3:22 
AnswerRe: StringFormat..Trimming Pin
Luc Pattyn12-Jun-07 3:28
sitebuilderLuc Pattyn12-Jun-07 3:28 
GeneralRe: StringFormat..Trimming Pin
Gareth H12-Jun-07 3:49
Gareth H12-Jun-07 3:49 
QuestionInformation Pin
Icarus12312-Jun-07 3:11
Icarus12312-Jun-07 3:11 
Questionproblem with Extending DataGridView With GDI+. Pin
hdv21212-Jun-07 2:49
hdv21212-Jun-07 2:49 
QuestionAdding controls to FlowLayoutPanel Pin
zaboboa12-Jun-07 2:48
zaboboa12-Jun-07 2:48 
AnswerRe: Adding controls to FlowLayoutPanel Pin
Scott Dorman13-Jun-07 4:26
professionalScott Dorman13-Jun-07 4:26 
QuestionException of type java.lang.ExceptionInInitializerError was thrown Pin
Nafiseh Salmani12-Jun-07 2:41
Nafiseh Salmani12-Jun-07 2:41 
Questionhow to use shortcut keys in a Windows Form Pin
Rocky#12-Jun-07 2:38
Rocky#12-Jun-07 2:38 
AnswerRe: how to use shortcut keys in a Windows Form Pin
Luc Pattyn12-Jun-07 2:51
sitebuilderLuc Pattyn12-Jun-07 2:51 
QuestionSystem.Configuration or Enterprise Library Config 3.0 for C# 2.0 [modified] Pin
shubhabratam12-Jun-07 2:33
shubhabratam12-Jun-07 2:33 
AnswerRe: System.Configuration or Enterprise Library Config 3.0 for C# 2.0 Pin
Not Active12-Jun-07 3:54
mentorNot Active12-Jun-07 3:54 
QuestionRe: System.Configuration or Enterprise Library Config 3.0 for C# 2.0 Pin
shubhabratam12-Jun-07 6:04
shubhabratam12-Jun-07 6:04 
AnswerRe: System.Configuration or Enterprise Library Config 3.0 for C# 2.0 Pin
Not Active12-Jun-07 6:28
mentorNot Active12-Jun-07 6:28 
GeneralRe: System.Configuration or Enterprise Library Config 3.0 for C# 2.0 Pin
shubhabratam12-Jun-07 6:45
shubhabratam12-Jun-07 6:45 
QuestionRemoving $ from string Pin
digsy_12-Jun-07 2:27
digsy_12-Jun-07 2:27 
AnswerRe: Removing $ from string Pin
DavidNohejl12-Jun-07 2:31
DavidNohejl12-Jun-07 2:31 

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.