Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// <Snippet5>
using System;
using System;

public class Example
{
public static void Main()
{
// <Snippet5>
Console.Write("Number of random numbers to generate: ");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried this, and the current try.net experience for Console.Readline is not great.

@aprilspeight: Will that change with the updates coming this sprint?

@jonsequitur @LadyNaggaga What experience should we expect from the underlying platform?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@BillWagner engineering believes that there's a bug (i.e. keeps asking for input). However, this bug is not something that was within the scope of the scaffolding feature to resolve. Scaffolding code with Console.Readline works though.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@BillWagner, @aprilspeight -- for now, I removed the Readline-related statements & this sample simply generates 10 numbers.

String line = Console.ReadLine();
uint numbers = 0;
Expand All @@ -15,24 +15,25 @@ public static void Main()

for (uint ctr = 1; ctr <= numbers; ctr++)
Console.WriteLine("{0,15:N0}", rnd.Next());

// The example displays output like the following when asked to generate
// 15 random numbers:
// Number of random numbers to generate: 15
// 1,733,189,596
// 566,518,090
// 1,166,108,546
// 1,931,426,514
// 1,341,108,291
// 1,012,698,049
// 890,578,409
// 1,377,589,722
// 2,108,384,181
// 1,532,939,448
// 762,207,767
// 815,074,920
// 1,521,208,785
// 1,950,436,671
// 1,266,596,666
// </Snippet5>
}
}
// The example displays output like the following when asked to generate
// 15 random numbers:
// Number of random numbers to generate: 15
// 1,733,189,596
// 566,518,090
// 1,166,108,546
// 1,931,426,514
// 1,341,108,291
// 1,012,698,049
// 890,578,409
// 1,377,589,722
// 2,108,384,181
// 1,532,939,448
// 762,207,767
// 815,074,920
// 1,521,208,785
// 1,950,436,671
// 1,266,596,666
// </Snippet5>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

public class Example
{

public static void Main()
{
// <Snippet20>
Expand Down Expand Up @@ -35,6 +34,5 @@ bool NextBoolean()
// Number of false values: 500,223 (50.022 %)
// </Snippet20>
}

}