0

Install .Net windows services without using installutil.exe

Posted by Chris Straw on November 2, 2013 in c#, vb.net, Windows Service |

Tweet When writing a windows service using c# (or vb.net), you can install the service locally using installutil.exe.  You can simply just install the service by using a few lines of c# code within your program’s startup.  By doing this, you will not be able to use Client Profile of the framework. By changing the Program.cs (main […]

Tags: , , ,

0

Disable WCF Certificate Check for Self-Assigned Certificates

Posted by Chris Straw on August 28, 2013 in c#, WCF |

Tweet To “turn off” the trusted certificate check for self-assigned certificates, just add this to the web.config

Tags: ,

2

Disable button on click ASP.Net 2.0 or higher (prevent double click)

Posted by Chris Straw on January 20, 2012 in ASP.net, c# |

Tweet There is a need, at times, to prevent the user from clicking a button multiple times.  Since ASP.Net already wraps something into the onclick event, you need to change this behavior.  Below is the code to do this: btnSave is the name of the button you want to disable during postback.

Tags: ,

0

Convert Value To Enum

Posted by Chris Straw on October 28, 2011 in c# |

Tweet It seams that nothing can be easier.  We easily can use ToString() method to convert Enum to String.

0

Convert Enum To String using c#

Posted by Chris Straw on October 28, 2011 in c# |

Tweet It seams that nothing can be easier.  We easily can use ToString() method to convert Enum to String.

0

Convert String To Enum using c#

Posted by Chris Straw on October 28, 2011 in c# |

Tweet To convert String to Enum we just need to use Parse() method.

Tags: ,

0

DateTime Format Strings in c#

Posted by Chris Straw on October 3, 2011 in c#, vb.net |

Tweet Following examples demonstrate how are the format specifiers rewritten to the output. Following examples show usage of standard format specifiers in String.Format method and the resulting output.

Tags: ,

0

How to instantiate a passed generic type inside a method in C#

Posted by Chris Straw on October 3, 2011 in c# |

Tweet To call the method:

Tags: ,

0

Copy Property Values using Reflection

Posted by Chris Straw on September 30, 2011 in c# |

Tweet

Tags: ,

5

Generate c# or vb.net class from XML file

Posted by Chris Straw on June 20, 2011 in c#, vb.net, XML/XSD |

Tweet XSD is a tool that can be used to generate a C# class from a given XML document. This class can then be used to deserialize and process the XML within your code. For my example, I’m using the GetBusinessCardCall from the Shoeboxed.com API.  I am currently writing a c# interface to read the data from Shoeboxed. […]

Tags: , , , , ,

Copyright © 2011-2019 Chris Straw All rights reserved.
This site is using the Desk Mess Mirrored theme, v2.5, from BuyNowShop.com.