Get all IP Addresses of the system in C#
First of all, the question arises,Can a computer have more than one IP? If a computer is connected to one network, then it can have only one unique IP Address. But if a computer is connected to more than one…
First of all, the question arises,Can a computer have more than one IP? If a computer is connected to one network, then it can have only one unique IP Address. But if a computer is connected to more than one…
Installing the Default instance of SQL Server 2008 R2 Express with Tools on a Windows 7 64bit failed with error: Error Says: Rule “Same architecture installation” failed. The CPU architecture of installing feature(s) is different than the instance specified. To…

java.lang.UnsupportedClassVersionError happens when you’re trying to load a Java “class” file that was compiled with a newer version of Java and you are trying to load(run) it with an older version. In other words, it could mean that Your system…
Suppose we have 2 Lists of Products, and we want to make it one List. List<Product> products1 = GetProducts(cid1); List<Product> products2 = GetProducts(cid2); One way is to iterate the 2nd List, and add all elements to the 1st List, or iterate both…

In C# the ‘@‘ character is used to denote literals that explicitly do not adhere to the relevant rules in the language specification. If we use a keyword as the name for an identifier, we get a compile-time error “identifier expected,…

We cannot have a static method inside an interface, like below: public interface Foo { public static int bar(); // compile time error } This will be a compile time Error saying: The modifier ‘static’ is not valid for this…

Removing elements from List<> while iterating over the List, someone may simply try: foreach(char c in list) { list.Remove(c); } But, When we execute this code, we will get System.InvalidOperationException with the message “Collection was modified; enumeration operation may not execute.” The reason is: The…

We have 2 Lists and we want to make it one and also remove the repeating values, i.e., we want a Union of the two Lists but no repeating value.We can always do it by iterating the 2nd List, and…

Following is the code to get the IP Address of the system using VBScript (.vbs) dim Nics, StrIP Set Nics= GetObject(“winmgmts:”) .InstancesOf(“Win32_NetworkAdapterConfiguration”) For Each Nic in Nics if Nic.IPEnabled then StrIP = Nic.IPAddress(i) Wscript.Echo “IP Address: “&StrIP wscript.quit end if…

XML parsing essentially means traversing through the XML and returning the data. Nowadays, A number of web services return data in JSON format, but a large number still use XML. There are two methods for loading XML, the simplexml_load_file() will load the…