strMailReceiver = "pechkin@derevnya.ru"
strMailServer = "10.7.1.6"
Set objEmail = WScript.CreateObject("CDO.Message")
objEmail.From = """Dyadya Fedor"" pes-i-kot@derevnya.ru"
objEmail.To = strMailReceiver
objEmail.Subject = "Figvam narisuem"
objEmail.Textbody = strMailBody
' Send with SMTP server (1 - use local SMTP)
objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
' Specify SMTP server
objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = strMailServer
objEmail.Configuration.Fields.Update
objEmail.Send
Nlog
SQLite
var dict = new Dictionary<MyNullableInt, string>();
dict[null] = "hello, world!";
Console.WriteLine(dict[null]); // Output: hello, world!
struct MyNullableInt: IEquatable<MyNullableInt>, IEquatable<int?>
{
public int? Value { get; set; }
public bool Equals(MyNullableInt other)
{
return other.Value == Value;
}
public bool Equals(int? other)
{
return other == Value;
}
public static implicit operator MyNullableInt(int? value)
{
return new MyNullableInt() {Value = value};
}
public static implicit operator int?(MyNullableInt value)
{
return value.Value;
}
public override bool Equals(object? obj)
{
if (obj is int value)
{
return value == Value;
}
if (obj is MyNullableInt mni)
{
return mni.Value == Value;
}
return false;
}
public override int GetHashCode()
{
return Value.GetHashCode();
}
}