/// <summary>
/// Returns true if any component of of Vector3 v is negative
/// </summary>
public static bool Ext_IsNegative(this Vector3 v)
{
return v.x < 0f && v.y < 0f && v.z < 0f;
}
Either the description is wrong or the method in itself
public class MetricsChecker
{
protected const string AwaitingRecognitionCountMetricName = "AwaitingRecognitionCount";
protected const string AwaitingExportCountMetricName = "AwaitingExportCount";
protected const string NotYetDownloadedEventCountMetricName = "NotYetDownloadedEventCount";
...
public virtual void PublishNotYetDownloadedEventCounts()
{
this.logger.Trace($"Starting to gather and publish {NotYetDownloadedEventCountMetricName}(s).");
...
}
...
}
private readonly FooType _foo = new FooType();
/// <summary>
/// Gets the controller of this component
/// </summary>
private FooType Foo
{
get
{
return _foo;
}
}
namespace network
{
class ip
{
uint _IP;
public ushort this[int i]
{
get
{
switch(i)
{
case 0:
case 1:
case 2:
case 3:
return (ushort)(_IP>>(i*8));
default:
throw new IndexOutOfRangeException();
}
}
set
{
switch(i)
{
case 0:
case 1:
case 2:
case 3:
_IP=(((uint)value)<<i*8);
break;
default:
throw new IndexOutOfRangeException();
}
}
}
}
}
I have no idea what this does
// IsFooBar being a boolean, we check if it's different from true and from false
if (x.IsFooBar != true && x.IsFooBar != false)
{
return "error";
}
x.IsFooBar is juste a regular bool
if (!String.IsNullOrEmpty(Client.CLADDR1))
{
if (Client.CLADDR1 == "NULL")
{
const int ONLY_ONE_ITEM = 1;
if (myList.Count > ONLY_ONE_ITEM)
{
DoSomething();
}
else
{
DoSomethingElse();
}
string AllPDF = "";
int CountPDF = 0;
AllPDF = txtInput.Text;
string[] AllPDF2 = AllPDF.Split(';');
List<string> PDF = new List<string>();
PDF.AddRange(AllPDF2);
while (PDF.Count != CountPDF)
{
File.Delete(AllPDF2[0 + CountPDF] + ".pdf");
CountPDF++;
}
I believe, there are so many easier ways to do that