OK semi new, so you may not think my brilliant discovery is oh so brilliant.. But the reprocussions knocked me dead.
I found to make code more readable, I can sub class things.
So I had in different class files (for readability)
File # 1 had...
namespace MyLibrary
{
public partial class Dates
{
public class Payroll
{
}
}
}
file # 2 had...
namespace MyLibrary
{
public partial class Dates
{
public class General
{
}
}
}
Now I can call MyLibrary.Dates.Payroll and MyLibrary.Dates.General
This all compiled well in the library and the calling programs.
But when I went to debug and step into the Library code I got this
"There is no Sourcecode availabe for the current Location. Show disassembly.. (Disassembly may make sense to some Geeks, but not me..)..
So was it the second Class level or the Partial? I found out it was the Partial when I changed the code to this, and was given back priveledge to step into it.
(One file)
namespace MyLibrary
{
public class Dates
{
public class Payroll
{
}
public class General
{
}
}
}
I still can call MyLibrary.Dates.Payroll and MyLibrary.Dates.General same as before but although in this simple example the second code looks more readable, you have to shove in all the muck inside each class (And add several other Date Related classes) and really it is a very long hard to interpret file..
So can anyone tell me how I can get Partial classes sourcecode to be readable in the debugger??? Also can anyone explain why Partial makes the sourcecode unavailable?