Не создаётся объект когда один из параметров null - C#
Формулировка задачи:
// создание объекта, 4-й параметр null - так ничего не происходит
FRequest request = new FRequest(Guid.Empty, guid, FatherRType.Skill, null, Skill, IsRepeat, IsTargetDead, PercentsMP, Send.RequestMagicSkillUse(Skill.id, false));
// Конструктор объекта:
public FRequest(Guid loopGuid, Guid guid, FatherRType type, L2Creature target, L2Skill skill, bool isRepeat, bool isTargetDead, int percentsMP, string packet)
{
this.loopGuid = loopGuid;
this.guid = guid;
this.type = type;
this.target = target;
this.skill = skill;
this.isRepeat = isRepeat;
this.isTargetDead = isTargetDead;
this.percentsMP = percentsMP;
this.packet = packet;
}Решение задачи: «Не создаётся объект когда один из параметров null»
textual
Листинг программы
Vars.form.WriteChat("0", L2ChatType.General); // метод вроде записи в лог
if (!IsReady) return;
Vars.form.WriteChat("1", L2ChatType.General);
if (Vars.FRequestList.ContainsGuid(guid)) return;
Vars.form.WriteChat("2", L2ChatType.General);
FRequest request = new FRequest(Guid.Empty, guid, FatherRType.Skill, null, Skill, IsRepeat, IsTargetDead, PercentsMP, Send.RequestMagicSkillUse(Skill.id, false));
Vars.form.WriteChat("3", L2ChatType.General);