Click here to Skip to main content
15,891,757 members
Home / Discussions / C#
   

C#

 
GeneralRe: How this below code works Pin
indian14311-Jan-10 14:27
indian14311-Jan-10 14:27 
QuestionBoolean value changes without being modified, don't know why. Pin
aespielberg11-Jan-10 10:14
aespielberg11-Jan-10 10:14 
AnswerRe: Boolean value changes without being modified, don't know why. Pin
Luc Pattyn11-Jan-10 10:56
sitebuilderLuc Pattyn11-Jan-10 10:56 
GeneralRe: Boolean value changes without being modified, don't know why. Pin
aespielberg11-Jan-10 11:08
aespielberg11-Jan-10 11:08 
GeneralRe: Boolean value changes without being modified, don't know why. Pin
Luc Pattyn11-Jan-10 11:24
sitebuilderLuc Pattyn11-Jan-10 11:24 
GeneralRe: Boolean value changes without being modified, don't know why. Pin
aespielberg11-Jan-10 11:41
aespielberg11-Jan-10 11:41 
GeneralRe: Boolean value changes without being modified, don't know why. Pin
Luc Pattyn11-Jan-10 12:06
sitebuilderLuc Pattyn11-Jan-10 12:06 
GeneralRe: Boolean value changes without being modified, don't know why. Pin
aespielberg11-Jan-10 12:23
aespielberg11-Jan-10 12:23 
Sure, I can give you that. I didn't really grow the program at all past this...I know that that's a bad idea, that's why I stopped coding after I checked this and found it didn't work properly.

I'm pretty sure this should be a property...it always returns the area of the polygon. That should be invariant, unless in some way the polygon mutates, i.e. I add a point. But if I don't add a point to the polygon, then it shouldn't change the value the property returns.

Class declarations:

class Polygon: Polytope


class Polytope


fields (declared in class Polygon)

private bool currAreaValid;
private double area;



size in Fold is the size of the polygon, this should be the number of points it contains. Size only changes if I add or remove a point from the polygon (but I do not yet have a remove function for the Polygon/Polytope class) Declaration:

protected int size;


It is accessible from a property Size.

tuple.First is the first element of the tuple. In this case I am using 2-tuples, of (Object, Point).

Let me know if you want to see anything else.

~Andy
GeneralRe: Boolean value changes without being modified, don't know why. Pin
Luc Pattyn11-Jan-10 13:08
sitebuilderLuc Pattyn11-Jan-10 13:08 
GeneralRe: Boolean value changes without being modified, don't know why. Pin
aespielberg11-Jan-10 13:24
aespielberg11-Jan-10 13:24 
GeneralRe: Boolean value changes without being modified, don't know why. Pin
aespielberg11-Jan-10 13:34
aespielberg11-Jan-10 13:34 
GeneralRe: Boolean value changes without being modified, don't know why. Pin
Luc Pattyn11-Jan-10 13:50
sitebuilderLuc Pattyn11-Jan-10 13:50 
GeneralRe: Boolean value changes without being modified, don't know why. Pin
Daniel Grunwald12-Jan-10 6:20
Daniel Grunwald12-Jan-10 6:20 
QuestionHow do I set the "Apply onto" option in NTFS file security rights using c#? Pin
arnold_w11-Jan-10 9:12
arnold_w11-Jan-10 9:12 
AnswerRe: How do I set the "Apply onto" option in NTFS file security rights using c#? [modified] Pin
arnold_w12-Jan-10 2:52
arnold_w12-Jan-10 2:52 
GeneralRe: How do I set the "Apply onto" option in NTFS file security rights using c#? Pin
batrado_®8-Feb-10 1:42
batrado_®8-Feb-10 1:42 
QuestionSend video capture over LAN Pin
shutupsquare11-Jan-10 8:58
shutupsquare11-Jan-10 8:58 
AnswerRe: Send video capture over LAN Pin
Alex Manolescu11-Jan-10 9:49
Alex Manolescu11-Jan-10 9:49 
QuestionFinding * characters in a string Pin
sleepyman11-Jan-10 8:52
sleepyman11-Jan-10 8:52 
AnswerRe: Finding * characters in a string Pin
Alex Manolescu11-Jan-10 9:31
Alex Manolescu11-Jan-10 9:31 
GeneralRe: Finding * characters in a string Pin
PIEBALDconsult11-Jan-10 14:54
mvePIEBALDconsult11-Jan-10 14:54 
AnswerRe: Finding * characters in a string Pin
Luc Pattyn11-Jan-10 9:48
sitebuilderLuc Pattyn11-Jan-10 9:48 
GeneralRe: Finding * characters in a string Pin
sleepyman12-Jan-10 8:11
sleepyman12-Jan-10 8:11 
AnswerRe: Finding * characters in a string Pin
PIEBALDconsult11-Jan-10 14:52
mvePIEBALDconsult11-Jan-10 14:52 
Questiongetting a specific tag out of a web page Dom info [modified] Pin
manustone11-Jan-10 6:39
manustone11-Jan-10 6:39 

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.