Click here to Skip to main content
15,889,637 members
Home / Discussions / C#
   

C#

 
AnswerRe: Abstract Class Pin
future383924-Apr-10 15:07
future383924-Apr-10 15:07 
GeneralRe: Abstract Class Pin
PIEBALDconsult24-Apr-10 16:37
mvePIEBALDconsult24-Apr-10 16:37 
GeneralRe: Abstract Class Pin
future383924-Apr-10 16:48
future383924-Apr-10 16:48 
GeneralRe: Abstract Class Pin
future383924-Apr-10 21:22
future383924-Apr-10 21:22 
GeneralRe: Abstract Class Pin
OriginalGriff24-Apr-10 21:29
mveOriginalGriff24-Apr-10 21:29 
GeneralRe: Abstract Class Pin
DaveyM6924-Apr-10 22:53
professionalDaveyM6924-Apr-10 22:53 
GeneralRe: Abstract Class Pin
Eddy Vluggen24-Apr-10 22:56
professionalEddy Vluggen24-Apr-10 22:56 
GeneralRe: Abstract Class Pin
future383925-Apr-10 13:45
future383925-Apr-10 13:45 
thanks a lot for your help.
I implement the 3rd part but I faced with a problem. in part 3, I create a random number and random weight. I check them with mentioend values but the problem is how I should access to the properties of the class.

this is part3,
================================================
fishes of different species with random weights, and if a fish is acceptable (i.e. is heavier
than 500 g and still edible) adds the fish in the basket, i.e. writes the fish object to the
basket.dat file . The process continues while the total weight of the fishes in the basket is
less than 15000 g. (15 Kg). To write fish objects to the file you should use Serialize()
method of the BinaryFormatter class (notice, that the Fish class should have [Serializable]
attribute).
==================================================

this is my code


public class fisshing
{
public static void fishing()
{
int basket = 0;
Random rand = new Random(0,4);
Random weight = new Random.next(0,10000);

do
{
switch (rand)
{
case 1:
if (weight > 500 && weight < 2500)
{
basket = basket + weight;
}
case 2:
if (weight > 500 && weight < 3000)
{
basket = basket + weight;
}
case 3:
if (weight > 500 && weight < 4000)
{
basket = basket + weight;
}
case 4:
if (weight > 500 && weight < 6000)
{
basket = basket + weight;
}
}
} while basket => 15000;
}
}
GeneralRe: Abstract Class Pin
future383925-Apr-10 17:06
future383925-Apr-10 17:06 
GeneralRe: Abstract Class Pin
Eddy Vluggen25-Apr-10 23:14
professionalEddy Vluggen25-Apr-10 23:14 
GeneralRe: Abstract Class Pin
Calla26-Apr-10 1:07
Calla26-Apr-10 1:07 
GeneralRe: Abstract Class Pin
Eddy Vluggen26-Apr-10 1:20
professionalEddy Vluggen26-Apr-10 1:20 
GeneralRe: Abstract Class Pin
future383926-Apr-10 1:44
future383926-Apr-10 1:44 
QuestionHow to send & receive sms via gsm modem ? Pin
hdv21224-Apr-10 9:39
hdv21224-Apr-10 9:39 
AnswerRe: How to send & receive sms via gsm modem ? Pin
Md. Marufuzzaman24-Apr-10 20:35
professionalMd. Marufuzzaman24-Apr-10 20:35 
GeneralRe: How to send & receive sms via gsm modem ? Pin
hdv21225-Apr-10 10:34
hdv21225-Apr-10 10:34 
QuestionBest way for windows application with good performance , SQL & Oracle support? Pin
anand kumar m24-Apr-10 5:51
anand kumar m24-Apr-10 5:51 
AnswerRe: Best way for windows application with good performance , SQL & Oracle support? [modified] Pin
PIEBALDconsult24-Apr-10 6:42
mvePIEBALDconsult24-Apr-10 6:42 
Questionproblem with MSCHART spline graph! [modified] Pin
alibaba88s24-Apr-10 2:29
alibaba88s24-Apr-10 2:29 
AnswerRe: problem with MSCHART spline graph! Pin
Luc Pattyn24-Apr-10 2:57
sitebuilderLuc Pattyn24-Apr-10 2:57 
GeneralRe: problem with MSCHART spline graph! [modified] Pin
alibaba88s24-Apr-10 3:00
alibaba88s24-Apr-10 3:00 
GeneralRe: problem with MSCHART spline graph! Pin
Luc Pattyn24-Apr-10 3:08
sitebuilderLuc Pattyn24-Apr-10 3:08 
GeneralRe: problem with MSCHART spline graph! Pin
alibaba88s24-Apr-10 3:37
alibaba88s24-Apr-10 3:37 
GeneralRe: problem with MSCHART spline graph! Pin
alibaba88s24-Apr-10 3:41
alibaba88s24-Apr-10 3:41 
GeneralRe: problem with MSCHART spline graph! Pin
Luc Pattyn24-Apr-10 3:57
sitebuilderLuc Pattyn24-Apr-10 3:57 

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.