Skip to content

Conversation

@davide-pi
Copy link

Issue #1615

  • I have read the Contribution Guidelines
  • I have commented on the issue above and discussed the intended changes
  • A maintainer has signed off on the changes and the issue was assigned to me
  • [ ] All newly added code is adequately covered by tests
  • All existing tests are still running without errors
  • The documentation was modified to reflect the changes OR no documentation changes are required.

Changes

Add some example in the TextPrompt documentation page


Please upvote 👍 this pull request if you are interested in it.

var name = AnsiConsole.Prompt(
new TextPrompt<string>("What's your name?"));
var age = AnsiConsole.Prompt(
new TextPrompt<short>("What's your age?"));
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we change this to int?

```csharp
// Ask the user a couple of simple questions
var name = AnsiConsole.Ask<string>("What's your name?");
var age = AnsiConsole.Ask<short>("What's your age?");
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we change this to int?

Copy link
Contributor

@patriksvensson patriksvensson left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@patriksvensson patriksvensson merged commit 78f3f80 into spectreconsole:main Sep 10, 2024
@davide-pi davide-pi deleted the fix/issue-1615-missing-examples-in-doc branch September 10, 2024 12:17
@FrankRay78
Copy link
Contributor

Well done @davide-pi 👏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants