Topics

Csharp

About this topic: Articles tagged __TAG__

Showing 448 articles

Topics

Articles

Showing 448 articles

How-tos How to Check if an Array Contains a Value in C# This article will guide you through the various methods available in C# to check for an element inside an array. How-tos How to Add Newline to String in C# There are 2 main methods that can be used to add a new line to a string in C#, the escape character, and the Environment.NewLine property. How-tos SQL Insert Query in C# There are 2 main methods that can be used to insert records to a database in C#, the direct query method and the parameterized query method. How-tos lock Statement in C# The lock statement specifies that the specified section of code cannot be accessed by multiple threads at the same time in C#. How-tos How to Make HTTP POST Web Request in C# There are 3 main methods that can be used to make an HTTP POST Web Request in C#, the WebClient class, the HttpWebRequest class, and the HttpClient class. How-tos How to Get the Size of an Array in C# There are 2 main methods that can be used to get the size of an array in C#, the Array.Length property, and the Array.Rank property. How-tos How to Get and Set in C# The get and set accessors are used to input and output data into a private field in C#. How-tos How to Convert List<string> to String in C# There are 3 main methods that can be used to convert a List to a string variable in C#, the LINQ Aggregate method, the String.Join() function and StringBuilder class. How-tos Enum Strings in C# There are 3 main methods that can be used to create an enumeration of strings in C#, the extension function, the constant variables method, and the ToString() function. How-tos Case Insensitive Contains String Function in C# There are two main methods that can be used to create a case insensitive contains (string) function in C#: the CultureInfo.IndexOf() function and the string.IndexOf() function. How-tos C++ Map<T1, T2> Equivalent in C# The SortedDictionary and the Dictionary classes in C# can be used in place of the map in C++. How-tos How to Split String to List in C# This tutorial discusses different methods for splitting a string into a list of strings in C#, discussing how each method works and its use cases. How-tos How to Encrypt and Decrypt a String in C# The AesManaged class can be used to encrypt and decrypt a string in C#. How-tos How to Copy a Object in C# There are 2 main methods that can be used to create a separate copy of an object in C#, the MemberWiseClone() function, and the parameterized constructor method. How-tos How to Copy a List in C# In this article, we will explore different techniques for copying lists in C# and discuss their use cases, advantages, and implementation details. How-tos How to Append to Array in C# There are 2 main methods that can be used to resize an array in C#, the list.Add() with the list.ToArray() functions, and the Array.Resize() function. How-tos Multiple Case Switch Statement in C# There are 2 syntaxes that can be used to create a multiple case switch statement in C#, the conventional switch statement and the range-based switch statement. How-tos How to Read and Write to a File in C# There are 4 main methods that can be used to read data from and write data to a file in C#, the File.WriteAllText() function, the File.ReadAllText() function, the StreamWriter … How-tos How to Encode and Decode a Base64 String in C# The Convert class can be used to encode a standard string to a base64 string and decode a base64 string to a standard string in C#. How-tos How to Call Constructor From Another Constructor in C# The this keyword can be used to call one constructor from another constructor of the same class in C#. How-tos Float vs Double vs Decimal in C# The difference between the float, double and decimal data types in C# is described below. How-tos How to Validate Email Address in C# There are 2 main methods that can be used to validate an email address in C#, the MailAddress class and the EmailAddressValidator class. How-tos How to Get the First Character of a String in C# There are several methods that can be used to get the first character of a string variable in C#. How-tos How to Get Relative Path of a File in C# There are 2 main methods that can be used to generate the relative path of a file in C#, the Path class, and the resources.resx file.

← All topics