What is this use of c# using statement?
namespace Microsoft.Owin.Host.SystemWeb.DataProtection {
using DataProtectionProviderDelegate = Func<string[], Tuple<Func<byte[], byte[]>, Func<byte[], byte[]>>>;
using DataProtectionTuple = Tuple<Func<byte[], byte[]>, Func<byte[], byte[]>>;
According to MSDN using statement has two usages.
But in this case, it's used to assign a delegate type. Can anyone please explain this usage, and provide a link a documentation?
In this case the using statement is being used to alias a type, so yes point (1) you stated.
Later on in code rather than having to type:
var x = new Tuple<Func<byte[], byte[]>, Func<byte[], byte[]>>(/* ... */);
You can write:
var x = new DataProtectionTuple(/* ... */);