Guest User

Untitled

a guest
Jun 22nd, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. string getQuote(){
  2. //Load collection of lines
  3. ArrayList quotes = getQuotesData();
  4. int quoteCount = quotes.Count;
  5.  
  6. // Set session or application variable to some number
  7. int counter;
  8. if( !Integer.parse( Session("counter"), counter ) ) { counter = 0; }
  9. if( counter > quoteCount ) { counter = 0; }
  10.  
  11. return quotes[counter];
  12. }
Add Comment
Please, Sign In to add comment