Click here to Skip to main content
15,921,169 members
Home / Discussions / C#
   

C#

 
GeneralAdding a row to SQL table using C# Pin
Larry Antram2-Dec-03 14:25
Larry Antram2-Dec-03 14:25 
GeneralRe: Adding a row to SQL table using C# Pin
Heath Stewart2-Dec-03 16:43
protectorHeath Stewart2-Dec-03 16:43 
GeneralRe: Adding a row to SQL table using C# Pin
Larry Antram2-Dec-03 16:59
Larry Antram2-Dec-03 16:59 
GeneralAny idea on this problem Pin
Alex Korchemniy2-Dec-03 13:18
Alex Korchemniy2-Dec-03 13:18 
GeneralRe: Any idea on this problem Pin
Heath Stewart2-Dec-03 16:57
protectorHeath Stewart2-Dec-03 16:57 
GeneralControl clipping Pin
Gary Kirkham2-Dec-03 10:38
Gary Kirkham2-Dec-03 10:38 
GeneralRe: Control clipping Pin
Alex Korchemniy2-Dec-03 11:04
Alex Korchemniy2-Dec-03 11:04 
GeneralAdding class values Pin
MrEyes2-Dec-03 7:32
MrEyes2-Dec-03 7:32 
Apologies if the title of this thread is a little vague.

Let me explain a little further, lets assume that I have the following simple class :

public class MyClass
{
 public int x;
 public MyClass(int x)
 {
   this.x = x
 }
}


Now elsewhere in code, I create multiple instances of this class :

MyClass mc1 = new MyClass(16);
MyClass mc2 = new MyClass(11);
MyClass mc3 = new MyClass(73);


What I would like to be able to do is add all the values in the current objects of a class to get a total. Forexample :

int ClassTotal = myClass.GetTotals();


Which in this example would return 100 (i.e. 16 + 11 + 73)

This also needs to be smart enough to handle the fact that an object may have been disposed, so if I was to dispose the object mc3, GetTotals would return 27


post.mode = signature;
SELECT everything FROM everywhere WHERE something = something_else;
> 1 Row Returned
> 42
GeneralRe: Adding class values Pin
ankita patel2-Dec-03 8:20
ankita patel2-Dec-03 8:20 
GeneralProblems calling a COM+ component Pin
Ivan Fernandez2-Dec-03 7:07
Ivan Fernandez2-Dec-03 7:07 
GeneralRe: Problems calling a COM+ component Pin
Bruce Duncan2-Dec-03 8:08
Bruce Duncan2-Dec-03 8:08 
GeneralRe: Problems calling a COM+ component Pin
Ivan Fernandez2-Dec-03 8:16
Ivan Fernandez2-Dec-03 8:16 
GeneralRe: Problems calling a COM+ component Pin
Heath Stewart2-Dec-03 8:56
protectorHeath Stewart2-Dec-03 8:56 
Generalvideo conference Pin
notaclue2-Dec-03 4:58
notaclue2-Dec-03 4:58 
GeneralMoving a file from one server to another Pin
chubbysilk2-Dec-03 4:12
chubbysilk2-Dec-03 4:12 
GeneralRe: Moving a file from one server to another Pin
Heath Stewart2-Dec-03 4:32
protectorHeath Stewart2-Dec-03 4:32 
GeneralGDI - Creating Images Pin
MrEyes2-Dec-03 3:31
MrEyes2-Dec-03 3:31 
GeneralRe: GDI - Creating Images Pin
Heath Stewart2-Dec-03 4:05
protectorHeath Stewart2-Dec-03 4:05 
GeneralRe: GDI - Creating Images Pin
MrEyes2-Dec-03 7:25
MrEyes2-Dec-03 7:25 
Generalneed source code Pin
Member 5581242-Dec-03 3:09
Member 5581242-Dec-03 3:09 
GeneralRe: need source code Pin
Christian Graus2-Dec-03 10:37
protectorChristian Graus2-Dec-03 10:37 
QuestionSaving nodes in a TreeView to an XML file? Pin
thomasa2-Dec-03 2:53
thomasa2-Dec-03 2:53 
AnswerRe: Saving nodes in a TreeView to an XML file? Pin
Heath Stewart2-Dec-03 4:00
protectorHeath Stewart2-Dec-03 4:00 
GeneralXML Comments Pin
Colin Angus Mackay2-Dec-03 0:39
Colin Angus Mackay2-Dec-03 0:39 
GeneralRe: XML Comments Pin
Heath Stewart2-Dec-03 3:41
protectorHeath Stewart2-Dec-03 3:41 

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.