Click here to Skip to main content
       

C#

 
Questionactivity-selection algorithm in c# Pinmembermazizi026-Jan-13 21:36 
AnswerRe: activity-selection algorithm in c# PinprotectorPete O'Hanlon26-Jan-13 22:16 
GeneralRe: activity-selection algorithm in c# Pinmembermazizi027-Jan-13 10:37 
GeneralRe: activity-selection algorithm in c# PinprotectorPete O'Hanlon27-Jan-13 10:50 
AnswerRe: activity-selection algorithm in c# PinmvpDave Kreskowiak27-Jan-13 4:46 
GeneralRe: activity-selection algorithm in c# Pinmembermazizi027-Jan-13 10:35 
GeneralRe: activity-selection algorithm in c# PinmvpDave Kreskowiak27-Jan-13 15:37 
AnswerRe: activity-selection algorithm in c# Pinmemberriced27-Jan-13 12:06 
Here's an activity selection algorithmm coded in C# - probably not what you want. Smile | :)
But you have not explained what you want.
      static void Main(string[] args)
      {
         Random rndGen = new Random();
         var activities = new List<string>() { "bake bread", "mow lawn", "read book", "sleep", "don batman costume", "sneeze",
                        "have a beer", "code furiously", "make excuse for late assignment", "plead for help"};
 
         for (int i = 0; i < 3; i++)
         {
            int act = rndGen.Next(activities.Count);
            Console.WriteLine((i+1).ToString() + ". " + activities[act]);
         }
         Console.ReadLine();
      }
Regards
David R
---------------------------------------------------------------
"Every program eventually becomes rococo, and then rubble." - Alan Perlis
The only valid measurement of code quality: WTFs/minute.

GeneralRe: activity-selection algorithm in c# PinmemberPIEBALDconsult27-Jan-13 18:50 
AnswerRe: activity-selection algorithm in c# PinmemberJ4amieC28-Jan-13 1:44 
AnswerRe: activity-selection algorithm in c# Pinmemberpt140128-Jan-13 9:40 
QuestionC# access excel file Pinmemberdcof26-Jan-13 19:24 
SuggestionRe: C# access excel file PinmvpRichard MacCutchan27-Jan-13 1:15 
AnswerRe: C# access excel file PinmvpDave Kreskowiak27-Jan-13 4:44 
QuestionWCF receiving large XML PinmemberAlex Campos Vzla25-Jan-13 12:39 
AnswerRe: WCF receiving large XML PinmvpEddy Vluggen26-Jan-13 4:38 
Questionreading NTFS Share permission - how to interpret SHARE_INFO_2.Permissions flag Pinmemberdevvvy25-Jan-13 9:52 
AnswerRe: reading NTFS Share permission - how to interpret SHARE_INFO_2.Permissions flag PinmemberAndré Kraak25-Jan-13 11:57 
AnswerRe: reading NTFS Share permission - how to interpret SHARE_INFO_2.Permissions flag PinmemberRichard Deeming28-Jan-13 3:02 
Questionreturn list of url if i enter specific keyword Pinmemberprashant.k.bamania25-Jan-13 3:24 
AnswerRe: return list of url if i enter specific keyword PinmvpRichard MacCutchan25-Jan-13 4:24 
GeneralRe: return list of url if i enter specific keyword Pinmemberprashant.k.bamania26-Jan-13 2:21 
GeneralRe: return list of url if i enter specific keyword PinmvpRichard MacCutchan26-Jan-13 2:23 
AnswerRe: return list of url if i enter specific keyword PinprotectorPete O'Hanlon25-Jan-13 4:53 
GeneralRe: return list of url if i enter specific keyword Pinmemberprashant.k.bamania26-Jan-13 2:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web03 | 2.8.141220.1 | Last Updated 21 Dec 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid