wait, you mean that the random method makes it so that it is the same sequence every time?
» Forum
> Your Projects
Ack, no, you're quite correct; .NET's Random class does indeed use a time-dependent seed if you don't explicitly supply one. (I should have checked the documentation again before posting that, sorry).
You should still do it outside of the loop for a couple of reasons.
1) Object creation is expensive
2) The time seed theoretically could be the same when you create the second Random instance, if you end up creating them fast enough.
Neither really matter in your case, but it's a good habit to get into.
Also, your indenting, braces, and hanging "else;" are terrible - fix that after you slap yourself.
1) Object creation is expensive
2) The time seed theoretically could be the same when you create the second Random instance, if you end up creating them fast enough.
Neither really matter in your case, but it's a good habit to get into.
Also, your indenting, braces, and hanging "else;" are terrible - fix that after you slap yourself.
merthsoft wrote:
CDI: You can always use Mono.
Doesn't mono only work on x86 based processors anyway?
You could just check their site (both Intel and PowerPC are supported for Mac OS X).
CDI wrote:
merthsoft wrote:
CDI: You can always use Mono.
Doesn't mono only work on x86 based processors anyway?
"Always code as if the person who will maintain your code is a maniac serial killer that knows where you live" -Unknown
"If you've done something right no one will know that you've done anything at all" -Futurama
"Have a nice day, or not, the choice is yours." Tom Steiner
<Michael_V> or create a Borg collective and call it The 83+
<Michael_V> Lower your slide cases and prepare to be silent linked. Memory clears are futile.
Ah, I was misinformed. And when I tried loading their site for some odd reason all I got were timeouts, thus, asking
CDI wrote:
Ah, I was misinformed. And when I tried loading their site for some odd reason all I got were timeouts, thus, asking
http://ftp.novell.com/pub/mono/archive/2.8/macos-10-ppc/10/MonoFramework-2.8_10.macos10.novell.ppc.dmg That should be what you need. I'm assuming you're PPC. merthsoft wrote:
CDI wrote:
Ah, I was misinformed. And when I tried loading their site for some odd reason all I got were timeouts, thus, asking
http://ftp.novell.com/pub/mono/archive/2.8/macos-10-ppc/10/MonoFramework-2.8_10.macos10.novell.ppc.dmg That should be what you need. I'm assuming you're PPC.For at least the remainder of the weekend. After that, perhaps not.
KermMartian wrote:
qazz42 wrote:
yeah, I tihnk that came up in omni too >.<
Dammit, can anyone make a post on Cemetech anymore without mentioning rival sites at least three times per post?
Good job on this, though, qazz; do you have any screenshots for our enjoyment?
a bit late, but three times per post is a bit of an exaggeration
anywho, I think I need to brush up on my C# at some point...
tho, this book I am reading is being a bit strange
fir example, the writer thinks that
(string[] args) = (string args[])
I mean, seriously.. get it right before publishing
Are you sure it's a C# book? That syntax is legal in Java. It's also possible what it used to be legal in C# for older versions. What's the version the book is targeting?
Ah, I did not know that then, it is targeting an older version I am assuming
and It cant be java considering there is a huge "C#" on the front cover
and It cant be java considering there is a huge "C#" on the front cover
merthsoft wrote:
Are you sure it's a C# book? That syntax is legal in Java. It's also possible what it used to be legal in C# for older versions. What's the version the book is targeting?
They didn't change the syntax in C# between versions, and Java and C# both specify arrays in the same way (string[] args)
string args[] would almost be C++, except main in C/C++ takes char* args[].
Kllrnohj wrote:
merthsoft wrote:
Are you sure it's a C# book? That syntax is legal in Java. It's also possible what it used to be legal in C# for older versions. What's the version the book is targeting?
They didn't change the syntax in C# between versions, and Java and C# both specify arrays in the same way (string[] args)
hmm, quick question
I always try to compile SirC's projects when ever he gives the source but the compiler is giving me an error that the namespace linq is missing
I assume that it is an assembly reference but I dont seem to have it >.>
I always try to compile SirC's projects when ever he gives the source but the compiler is giving me an error that the namespace linq is missing
I assume that it is an assembly reference but I dont seem to have it >.>
Are you using Visual Studio 2008 or 2010? LINQ was added in .NET 3.5, so you need a relatively recent version of Visual Studio for it.
Alternatively, just remove the using directive - Visual Studio includes it by default, even if you don't use it. (Right-click, Organize Usings, Remove and Sort is handy).
Alternatively, just remove the using directive - Visual Studio includes it by default, even if you don't use it. (Right-click, Organize Usings, Remove and Sort is handy).
Visual Studio Express is free. You can even use it for commercial purposes. If you're a student in the USA you can also get a free copy of Visual Studio Professional through DreamSpark.
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.
» Go to Registration page
» Go to Registration page
» Goto page Previous 1, 2
» View previous topic :: View next topic
» View previous topic :: View next topic
Page 2 of 2
» All times are UTC - 5 Hours
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Advertisement