2020-06-30 14:41:58 +02:00
include::../description.adoc[]
include::../ask-yourself.adoc[]
include::../recommended.adoc[]
== Sensitive Code Example
----
using System;
public class C
{
public void Main()
{
Console.In; // Sensitive
var code = Console.Read(); // Sensitive
var keyInfo = Console.ReadKey(...); // Sensitive
var text = Console.ReadLine(); // Sensitive
Console.OpenStandardInput(...); // Sensitive
}
}
----
== Exceptions
2021-01-27 13:42:22 +01:00
This rule does not raise issues when the return value of the ``++Console.Read++`` ``++Console.ReadKey++`` or ``++Console.ReadLine++`` methods is ignored.
2020-06-30 14:41:58 +02:00
----
using System;
public class C
{
public void Main()
{
Console.ReadKey(...); // Return value is ignored
Console.ReadLine(); // Return value is ignored
}
}
----
include::../see.adoc[]
2021-06-02 20:44:38 +02:00
2021-06-03 09:05:38 +02:00
ifdef::env-github,rspecator-view[]
2021-09-20 15:38:42 +02:00
'''
== Implementation Specification
(visible only on this page)
include::../message.adoc[]
2021-06-08 15:52:13 +02:00
'''
2021-06-02 20:44:38 +02:00
== Comments And Links
(visible only on this page)
2023-05-25 14:18:12 +02:00
=== on 16 Oct 2018, 17:43:47 Nicolas Harraudeau wrote:
*Implementation details*:
Any reference to ``++Console.In++`` should create an issue.
include::../comments-and-links.adoc[]
2021-06-03 09:05:38 +02:00
endif::env-github,rspecator-view[]