Quantcast
Channel: csharp Feed
Browsing latest articles
Browse All 5 View Live

Is .Net code susceptible to buffer overflow issues?

Answer:C# or C++ code in the .NET framework can be immune to buffer overflows if the code is managed. Managed code is the code that is executed by a .NET virtual machine, such as Microsoft's. Before...

View Article



How do you convert Image to Base64 String in C#?

Code Snippet publicstring ImageToBase64(Image image,   System.Drawing.Imaging.ImageFormat format){  using(MemoryStream ms =new MemoryStream())  {    // Convert Image to byte[]    image.Save(ms,...

View Article

How do you convert Image in Base64 String to actual Image in C#?

Code Snippet public Image Base64ToImage(string base64String){  // Convert Base64 String to byte[]  byte[] imageBytes = Convert.FromBase64String(base64String);  MemoryStream ms =new...

View Article

How to generate a random number in CSharp?

In order to generate a random number between two numbers, use the Next Function of the Random class as shown below:Example :

View Article

What are the various common namespaces in CSharp?

The following are the common namespaces in CSharp.System Contains the definition of fundamental types,
conversion between types, mathematics, program
invocation, and environment management....

View Article

Browsing latest articles
Browse All 5 View Live




Latest Images