keyword - What is this use of C# 'using' statement? -
what 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 msdn using statement has 2 usages.
- (directive) import types current files, either directly or giving alias
- (statement) ensure idisposable objects disposed.
but in case, it's used assign delegate type. can please explain usage, , provide link documentation?
in case using statement being used alias type, yes point (1) stated.
later on in code rather having type:
var x = new tuple<func<byte[], byte[]>, func<byte[], byte[]>>(/* ... */);
you can write:
var x = new dataprotectiontuple(/* ... */);
Comments
Post a Comment