Tag: C#

Why is C# Main Method static ?

Why is C# Main Method static ? – One of the most frequently asked question if you are a beginner to C# isn’t it ? The Main Share method in the Program.cs looks like this using System; using System.Collections.Generic; using System.Linq; namespace ConsoleApplication1 { class Program cheap NFL jerseys { ??????????????????????????????3P????? WHEELHOUSE static void Americans Main(string[] args) wholesale jerseys { Console.WriteLine(“Hello World”); ??????? } }…

How to Declare Array of Objects in C# ?

Do you want to declare an array of objects in your C# application ? . Below is a sample code snippet that demonstrates how to declare an integer array in C#. How to Declare Array of Objects in C# ?

How to embed quotes inside string in C# ?

If you want to embed quotes within a string in C# , you can use the escape sequence \ followed by the double quotes. How to embed quotes inside string in C# ? Below is a sample sourcecode demonstrating How to embed quotes inside string in C# .

Fully Qualified Name in NameSpace

When accessing a class in C# , you use the fully qualifies Name of the class along with the NameSpace . The Fully Qualified Name indicates the logical hierarchy of the class . Below is the sample code that demonstrates the Fully Qualified Name namespace ConsoleApplication4 {     internal class Program     {         private static void Main(string[] args)         {             System.Console.WriteLine(“This is a…

Using block for SQLConnection in C#

The using statement in C# can also be used to ensure that the resources are automatically cleaned before the using block exits. One of the criteria of the Using statement is that the items being created in the using statement must implement IDisposable interface. For example, you can use the using block to open the SQL Connection, retrieve the data. Using block for SQLConnection in…

How to Launch the Application Details Page in Windows Phone Store using C#?

The Windows Phone 8 SDK provides the MarketplaceDetailTask which lets the users to launch the specified application’s details page in the Windows Phone Store from the Windows Phone App. How to Launch the Application Details Page in Windows Phone Store using C#? Below is a sample code snippet that demonstrates how to use the MarketplaceDetailTask. Modify the Content Identifier to specify the app for which…

How to check the Equality of Anonymous Types in C#?

The Equals method is used to check the equality. The anonymous types will be equal of it has the same order, type, name and values. How to check the Equality of Anonymous Types in C#? Below is a sample sourcecode demonstrating how to check the Equality of Anonymous types in c#.

iText Library for Creating PDF documents in C# and Java

iText is a PDF Library or API (Application Programming Interface ) that allows the developers to generate PDF documents based on the data from database or XML file. iText is available in Java as well as .NET (C#) and uses LDF’s many interactive features. iText library allows the developers to add bookmarks , page numbers and watermarks. Know more about iText Library for Creating PDF…