- 1
- 2
- 3
- 4
void delete_ServerClick(object sender, ImageClickEventArgs e)
{
Parent.FindControl(ID).Visible = false;
}
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+8.5
void delete_ServerClick(object sender, ImageClickEventArgs e)
{
Parent.FindControl(ID).Visible = false;
}
автоматически генерируемый контрол, метод находится непосредственно в самом контроле
+2.4
int a=0;
if (a != 0)
{
a=0;
}
else a=0;
+14.3
bool exitstatus = true;
if (!extremalexit) { exitstatus = true; }
На всякий случай присвоим еще раз
[Ф]
+929.5
if (a == null == false) {
}
когда проверял чужой код пол часа смотрел пока понял что чувак просто не умеет писать if (а != null)
+3.4
try
{
...
if (obj == null)
{
LogManager.GetLogger("Log").Warn(msg);
throw new SoapException("Object not found", SoapException.ServerFaultCode);
}
}
catch (Exception ex)
{
LogManager.GetLogger("Log").Error(msg, ex);
throw new SoapException("Object not found, SoapException.ServerFaultCode, ex);
}
+30
clsLine L = Lines[4][i];
int Ind = Lines[4].IndexOf(L);
+27
if (Monitor.TryEnter(this))
{
...
}
else
{
// do not do anything
}
−11.8
protected string TryToUpper(string text)
{
StringBuilder sb = new StringBuilder();
foreach(char t in text)
{
try
{
sb.Append(t.ToString().ToUpper());
}
catch
{
sb.Append(t.ToString());
}
}
return sb.ToString();
}
+29
return Array.IndexOf<int>
(
Array.ConvertAll<object, int>
(
usedTemplates,
delegate(object o) { return (int)o; }
),
templateID
)
>= 0;
−7
private string parameterName;
public string ParameterName
{
get { return parameterName; }
set { parameterName = value; }
}
И эта куча г... вместо: public string ParameterName {get; set;}