
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 2587 Articles for Csharp

728 Views
Title case is any text, such as in a title or heading, where the first letter of major words is capitalized. Title case or headline case is a style of capitalization used for rendering the titles of published works or works of art in English.When using title case, all words are capitalized except for "minor" words unless they are the first or last word of the title.The current implementation of the ToTitleCase in the example yields an output string that is the same length as the input string.Example 1class Program{ static void Main(string[] args){ string myString ... Read More

6K+ Views
The System. Reflection namespace contains classes that allow you to obtain information about the application and to dynamically add types, values, and objects to the application.Reflection objects are used for obtaining type information at runtime. The classes that give access to the metadata of a running program are in the System. Reflection namespace.Reflection allows view attribute information at runtime.Reflection allows examining various types in an assembly and instantiate these types.Reflection allows late binding to methods and properties.Reflection allows creating new types at runtime and then performs some tasks using those types.ExampleGetProperty(String)Searches for the public property with the specified name.GetType(String, Boolean)Gets ... Read More

1K+ Views
In c#, the throw is a keyword and it is useful to throw an exception manually during the execution of the program and we can handle those thrown exceptions using try−catch blocks based on our requirements.By using throw keyword in the catch block, we can re-throw an exception that is handled in the catch block. The re-throwing an exception is useful when we want to pass an exception to the caller to handle it in a way they want.Following is the example of re−throwing an exception to the caller using throw keyword with try-catch blocks in c#.Exampleclass Program{ static ... Read More

585 Views
Lambda expression is a better way to represent an anonymous method. Both anonymous methods and Lambda expressions allow you define the method implementation inline, however, an anonymous method explicitly requires you to define the parameter types and the return type for a method.Expression lambda that has an expression as its body: (input−parameters) => expressionStatement lambda that has a statement block as its body: (input−parameters) => { }Any lambda expression can be converted to a delegate type. The delegate type to which a lambda expression can be converted is defined by the types of its parameters and return value. If ... Read More

33K+ Views
In C#, String.Contains() is a string method. This method is used to check whether the substring occurs within a given string or not. It returns the boolean value. If substring exists in string or value is the empty string (""), then it returns True, otherwise returns False. Exception − This method can give ArgumentNullException if str is null. This method performs the case-sensitive checking. The search will always begin from the first character position of the string and continues until the last character position. Example 1 Contains is case sensitive if the string is found it return true else false ... Read More

2K+ Views
| OperatorThe | operator computes the logical OR of its operands. The result of x | y is true if either x or y evaluates to true. Otherwise, the result is false.The | operator evaluates both operands even if the left-hand operand evaluates to true, so that the operation result is true regardless of the value of the right-hand operand.|| OperatorThe conditional logical OR operator ||, also known as the "short−circuiting" logical OR operator, computes the logical OR of its operands.The result of x || y is true if either x or y evaluates to true. Otherwise, the result is ... Read More

1K+ Views
IP (Internet Protocol) Address is an address of your network hardware. It helps in connecting your computer to other devices on your network and all over the world. An IP Address is made up of numbers or characters.All devices that are connected to an internet connection have a unique IP address which means there’s a need of billions of IP addresses. This requirement is fulfilled by the new IP version IPv6.Private IP AddressA private IP address is the address of your device connected on the home or business network. If you have a few different devices connected to one ISP ... Read More

576 Views
The WebClient class provides common methods for sending data to or receiving data from any local, intranet, or Internet resource identified by a URI.The WebClient class uses the WebRequest class to provide access to resources. WebClient instances can access data with any WebRequest descendant registered with the WebRequest.RegisterPrefix method.DownloadString Downloads a String from a resource and returns a String.If your request requires an optional header, you must add the header to the Headers collectionExampleIn the below example we are calling the url "https://jsonplaceholder.typicode.com/posts"The example is then deserialized to User arrayFrom the user array we are printing the first array valueExampleclass ... Read More

321 Views
The [] operator is called an indexer.An indexer allows an object to be indexed such as an array. When you define an indexer for a class, this class behaves similar to a virtual array. You can then access the instance of this class using the array access operator ([ ]).Indexers can be overloaded. Indexers can also be declared with multiple parameters and each parameter may be a different type. It is not necessary that the indexes have to be integers.Example 1static void Main(string[] args){ IndexerClass Team = new IndexerClass(); Team[0] = "A"; Team[1] = "B"; Team[2] ... Read More