Get MAC Address in C Sharp

In below code, we will show how to get the MAC address of the same system. public string GetMACAddress() { try { NetworkInterface[] nics = NetworkInterface.GetAllNetworkInterfaces(); String sMacAddress = string.Empty; foreach (NetworkInterface adapter in nics) { if (sMacAddress == String.Empty)// only return MAC Address from first card { IPInterfaceProperties properties = adapter.GetIPProperties(); sMacAddress = adapter.GetPhysicalAddress().ToString(); […]

Read More

One Controller inherit from another controller in the same module

It can but you have to use the $controller service to instantiate the controller instead: var app = angular.module(‘angularjs-starter’, []); app.controller(‘ParentCtrl ‘, function($scope) { // I’m the sibling, but want to act as parent }); app.controller(‘ChildCtrl’, function($scope, $controller) { $controller(‘ParentCtrl’, {$scope: $scope}); //This works });

Read More