- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Samual Sam has Published 2492 Articles
Samual Sam
295 Views
Let’s say we want to convert the number 48 to binary.Firstly, set it and use the / and % operators and loop until the value is greater than 1 −decVal = 48; while (decVal >= 1) { val = decVal / 2; a += (decVal % 2).ToString(); ... Read More
Samual Sam
2K+ Views
System.Collections.Generic namespace is available in C# for LinkedList. The LinkedList class allows insertion and deletion of elements from the list at a fast pace.C# LinkedList class uses the concept of linked list. It allows us to insert and delete elements fastly. It can have duplicate elements. It is found in ... Read More
Samual Sam
289 Views
Java has SortedMap Interface, whereas an equivalent of it in C# is SortedList.SortedList collection in C# use a key as well as an index to access the items in a list.A sorted list is a combination of an array and a hash table. It contains a list of items that ... Read More
Samual Sam
1K+ Views
To get the difference between two lists, firstly set two lists in C# −// first list List < string > list1 = new List < string > (); list1.Add("A"); list1.Add("B"); list1.Add("C"); list1.Add("D"); // second list List < string > list2 = new List < string > (); list2.Add("C"); list2.Add("D"); ... Read More
Samual Sam
87 Views
A jagged array is an array of arrays, and therefore its elements are reference types and are initialized to null.Let us see how to work with Jagged array −Declare a jagged array −int [][] marks;Now, let us initialize it, wherein marks is an arrays of 5 integers −int[][] marks = ... Read More
Samual Sam
487 Views
The following states what is an unmanaged code −Applications that are not under the control of the CLR are unmanagedThe unsafe code or the unmanaged code is a code block that uses a pointer variable.The unsafe modifier allows pointer usage in unmanaged code.Here is the module showing how to declare ... Read More
Samual Sam
554 Views
Let’s say the following is our float −float n = 50.5f;Take an empty string to display the binary value and loop until the value of our float variable is greater than 1 −string a = ""; while (n >= 1) { a = (n % 2) + a; ... Read More
Samual Sam
1K+ Views
The System.Net.Sockets namespace has a managed implementation of the Windows Sockets interface.It has two basic modes − synchronous and asynchronous.Let us see an example to work with System.Net.Sockets.TcpListener class −TcpListener l = new TcpListener(1234); l.Start(); // creating a socket Socket s = l.AcceptSocket(); Stream network = new NetworkStream(s);The following ... Read More
Samual Sam
627 Views
To find the frequency of each word in a string, you can try to run the following code −Example Live Demousing System; class Demo { static int maxCHARS = 256; static void calculate(String s, int[] cal) { for (int i = 0; i < s.Length; i++) ... Read More
Samual Sam
531 Views
To create a new thread.Thread thread = Thread.CurrentThread; thread.Name = "My new Thread”;To get the current context id, use the ContextID property.Thread.CurrentContext.ContextIDLet us see the complete code −Example Live Demousing System; using System.Threading; namespace Demo { class MyClass { static void Main(string[] args) { ... Read More