Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / April 2007

Tip: Looking for answers? Try searching our database.

Command Window error when attempting to modify variable

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
luke_airig@hotmail.com - 03 Apr 2007 22:54 GMT
Microsoft Development Environment 2003 Version 7.1.3088
Microsoft .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
Peter Duniho - 04 Apr 2007 00:29 GMT
> [...]
> Here are the contents of the Command Window:
[quoted text clipped - 3 lines]
>
> Can anyone give some insight to this problem or recommend a solution?

You do not offer enough information for anyone to know for sure, since you  
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 the  
number of elements in the Rows collection, you need to do so by adding or  
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

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.