Events Background While theoretically delegates could be used by consumers as an even mechanism, it has some serious drawbacks. If we made our delegate public and allowed subscribers to add methods to our delegates invocation list, they would be able to receive notifications. However they would also be able to do something like the following: MessageLogger = null; In one misused line of code, our delegate has been wiped out along with it's invocation list and any link to subscribers has been lost. As a result, Events act as an abstraction on top of delegates to manage the invocation list with fairly limited Add and Remove operations. Subscribers go through the public event to add methods which in turn acts on the underlying delegate invocation list. What is an Event? Events allows a class to send notifications to other classes or objects that subscribe to the event. When an event is raised, any objects that have subscribed to the event will receive an even
New-AzDnsRecordSet -ZoneName happycampervan.co.uk -ResourceGroupName happycampervan ` -Name "@" -RecordType "txt" -Ttl 600 ` -DnsRecords (New-AzDnsRecordConfig -Value "happycampervan.co.uk") A Record ----------- New-AzDnsRecordSet -Name "@" -RecordType "A" -ZoneName "happycampervan.co.uk" ` -ResourceGroupName "happycampervan" -Ttl 600 ` -DnsRecords (New-AzDnsRecordConfig -IPv4Address "51.140.185.151") CName Record ------------ New-AzDnsRecordSet -ZoneName happycampervan.co.uk -ResourceGroupName "happycampervan" ` -Name "www" -RecordType "CNAME" -Ttl 600 ` -DnsRecords (New-AzDnsRecordConfig -cname "happycampervan.co.uk") Remove-AzDnsRecordSet -RecordType "CNAME" -Name "www" -ZoneName "happycampervan.co.uk" -ResourceGroupName "happycampervan" -Confirm:$False TXT record -----