DoesNotReturn
attribute should not return a value CS-R1003A method with the DoesNotReturn
attribute suggests that the method does not return anything. Therefore, having return
statements inside such methods does not make any sense. Therefore, it is suggested that you refactor your code accordingly, i.e., drop the said attribute or modify your method's logic.
[DoesNotReturn]
public int NthPrimeNumber(int n)
{
// ...
}
public int NthPrimeNumber(int n)
{
// ...
}