Click here to Skip to main content
15,896,118 members
Home / Discussions / C#
   

C#

 
GeneralRe: WebBrowser control steal focus on page load Pin
harold aptroot11-Oct-09 5:39
harold aptroot11-Oct-09 5:39 
QuestionList tree help! Pin
venomation10-Oct-09 9:56
venomation10-Oct-09 9:56 
AnswerRe: List tree help! Pin
Mycroft Holmes10-Oct-09 12:43
professionalMycroft Holmes10-Oct-09 12:43 
GeneralRe: List tree help! Pin
venomation10-Oct-09 12:59
venomation10-Oct-09 12:59 
AnswerRe: List tree help! Pin
Nicholas Butler11-Oct-09 1:14
sitebuilderNicholas Butler11-Oct-09 1:14 
GeneralRe: List tree help! Pin
venomation11-Oct-09 3:13
venomation11-Oct-09 3:13 
QuestionPageSetupDialog doesn't autoselect "US Index Card 5x8" in Page Size dropdown list Pin
Mzungu Mark10-Oct-09 9:16
Mzungu Mark10-Oct-09 9:16 
QuestionDebugging a getter Pin
Hans Ruck10-Oct-09 9:03
Hans Ruck10-Oct-09 9:03 
Hi,

I am using the following code for testing purposes:
public class VariousTests
{
    public static void Main(string[] args)
    {
        AClass c = new AClass();
        int y = c.DemandSupplyMatrix[0, 0]; // breakpoint 2
    }
}

class AClass
{
    private int[,] _aMatrix = null;
    public int[,] DemandSupplyMatrix
    {
        get
        {
            if (_aMatrix == null)
                _aMatrix = new int[9, 4];

            return _aMatrix; // breakpoint 1
        }
    }
}

I run it until I hit breakpoint 2 and I expect to see DemandSupplyMatrix being null in the debugger. Instead, it appears to have been already instantiated, and I have never hit breakpoint 1...

I really need to debug the getter but it seems that I have no chance.
Is this normal or am I missing something?

Bogdan.

AnswerRe: Debugging a getter Pin
Luc Pattyn10-Oct-09 11:04
sitebuilderLuc Pattyn10-Oct-09 11:04 
GeneralRe: Debugging a getter Pin
stancrm10-Oct-09 11:53
stancrm10-Oct-09 11:53 
GeneralRe: Debugging a getter Pin
Luc Pattyn10-Oct-09 12:50
sitebuilderLuc Pattyn10-Oct-09 12:50 
Questionbest way for a client/server program Pin
teknolog12310-Oct-09 8:51
teknolog12310-Oct-09 8:51 
AnswerRe: best way for a client/server program Pin
Md. Marufuzzaman10-Oct-09 8:58
professionalMd. Marufuzzaman10-Oct-09 8:58 
GeneralRe: best way for a client/server program Pin
teknolog12310-Oct-09 9:09
teknolog12310-Oct-09 9:09 
GeneralRe: best way for a client/server program Pin
Md. Marufuzzaman10-Oct-09 9:34
professionalMd. Marufuzzaman10-Oct-09 9:34 
GeneralRe: best way for a client/server program [modified] Pin
teknolog12310-Oct-09 9:49
teknolog12310-Oct-09 9:49 
GeneralRe: best way for a client/server program Pin
Xmen Real 10-Oct-09 20:31
professional Xmen Real 10-Oct-09 20:31 
AnswerRe: best way for a client/server program Pin
harold aptroot10-Oct-09 9:16
harold aptroot10-Oct-09 9:16 
GeneralRe: best way for a client/server program Pin
Md. Marufuzzaman10-Oct-09 9:21
professionalMd. Marufuzzaman10-Oct-09 9:21 
GeneralRe: best way for a client/server program Pin
harold aptroot10-Oct-09 9:28
harold aptroot10-Oct-09 9:28 
GeneralRe: best way for a client/server program Pin
PaulSMvno5-Dec-19 20:42
PaulSMvno5-Dec-19 20:42 
GeneralRe: best way for a client/server program Pin
teknolog12310-Oct-09 9:22
teknolog12310-Oct-09 9:22 
Questionc# to vb.bet Pin
Tamimi - Code10-Oct-09 7:52
Tamimi - Code10-Oct-09 7:52 
AnswerRe: c# to vb.bet Pin
dan!sh 10-Oct-09 8:42
professional dan!sh 10-Oct-09 8:42 
AnswerRe: c# to vb.bet Pin
SimpleData10-Oct-09 8:43
SimpleData10-Oct-09 8:43 

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.