|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Command Window error when attempting to modify variableMicrosoft .NET Framework 1.1 Version 1.1.4322 I am trying to modify the value of a variable in the Command Window (immediate mode) but I am getting an error. Here is the code snippet: U_Appr_InfoDS.U_APPR_INFODataTable dt = da.GetAllAppraiserInfo(this.LoanNumber); if (dt.Rows.Count > 0) //My breakpoint is set here... Here are the contents of the Command Window: dt.Rows.Count=1 error: cannot assign '1' into 'dt.Rows.Count' Can anyone give some insight to this problem or recommend a solution? TIA Luke On Tue, 03 Apr 2007 14:54:49 -0700, <luke_ai***@hotmail.com> wrote:
> [...] You do not offer enough information for anyone to know for sure, since y=> Here are the contents of the Command Window: > > dt.Rows.Count=3D1 > error: cannot assign '1' into 'dt.Rows.Count' > > Can anyone give some insight to this problem or recommend a solution? ou = didn't include anything that would tell us for sure what the type of "dt= " = is, what type its Rows property is, or how the Count property is to be = used. However, if it's anything at all like other classes, the Count property = is = read-only and you cannot assign anything to it. If you want to change t= he = number of elements in the Rows collection, you need to do so by adding o= r = removing items. It's certainly possible to design a class that would do= = that for you when you assign a value to the Count property, but it would= = be a bad idea and I hope there aren't any .NET classes that do that. Pete
Other interesting topics
assembly always gets built optimized
TextWriter.Synchronized C# code works if running from Visual studio, but not from executable file? Killing a process while in a TransactionScope powerpoint to video component DllImport attribute PlatformNotSupportedException on Windows 2003 server x64 Find COM device connected Making a copy of session objects Accelerator key not working |
|||||||||||||||||||||||