Warning: strstr() expects parameter 1 to be string, array given in /f2/f9blog/public/wp-content/plugins/autoblogged/ab-functions.php on line 49
you-may - F9 Group Marketing and Technology Blog

F9 Group Marketing and Technology Blog

Marketing, Technology, and current news at http://www.f9group.com/

Entries Tagged ‘you-may’

C# Custom Enumerators Made Simple with the Yield Keyword

An enumerator enables you to iterate over a collection in a foreach loop.  You can use foreach to iterate over all C# collection classes, because all C# collection classes inherit from the IEnumerable interface (regular or generic).  IEnumerable contains the GetEnumerator method, which returns an enumerator. Occasionally you may find a need to create a Related posts: Convert Between Generic IEnumerable<T> Convert Generic ICollection<T> Multiple Generic IEnumerable<T>

Share and Enjoy:
  • Digg
  • Google
  • del.icio.us
  • Technorati
  • Facebook
  • MySpace
  • TwitThis
  • Blogsvine
  • description
  • E-mail this story to a friend!
  • Ping.fm
  • Print this article!
  • Slashdot
  • Yahoo! Buzz

Error CS0016: Could not write to output file

If you attempt to run an ASP.NET application hosted on IIS running on Windows Home Basic or Premium, you may receive the following error: error CS0016: Could not write to output file ‘c:WindowsMicrosoft.NETFramework… More information > Related posts:Solution file error MSB5014Run ASP.NET and IIS on Windows Vista and 7 Home PremiumConsole Output from a WinForms Application Related posts: Solution file error MSB5014 Run ASP.NET and IIS on Windows Vista and 7 Home Premium Console Output from a WinForms Application

Share and Enjoy:
  • Digg
  • Google
  • del.icio.us
  • Technorati
  • Facebook
  • MySpace
  • TwitThis
  • Blogsvine
  • description
  • E-mail this story to a friend!
  • Ping.fm
  • Print this article!
  • Slashdot
  • Yahoo! Buzz

How  and 65279 and Other Byte Order Marks (BOM) Can Mess Up Your XML

When you download XML text from the Web, you may find “garbage characters” in the start of your XML string.  For example, I encountered this result when I downloaded an XML string using WebClient.DownloadString method: <Root><Item>Hello, World</Item></Root> What you are likely seeing is a Byte Order Mark (BOM), which is a Unicode character that indicates the endian-ness Related posts: C# Convert Byte Array to String Read File into Byte Array

Share and Enjoy:
  • Digg
  • Google
  • del.icio.us
  • Technorati
  • Facebook
  • MySpace
  • TwitThis
  • Blogsvine
  • description
  • E-mail this story to a friend!
  • Ping.fm
  • Print this article!
  • Slashdot
  • Yahoo! Buzz

Clean/Strip/Remove Binary Characters from C# String

Sometimes you may need to display or print an input string that contains binary characters.  The following function replaces all binary characters in a string with a blank.  You can easily modify this method to remove other undesirable characters (such as high-ASCII) if needed. Strip Function static public string CleanString( string s ) { if

Share and Enjoy:
  • Digg
  • Google
  • del.icio.us
  • Technorati
  • Facebook
  • MySpace
  • TwitThis
  • Blogsvine
  • description
  • E-mail this story to a friend!
  • Ping.fm
  • Print this article!
  • Slashdot
  • Yahoo! Buzz

Clear C# StringBuilder

Many .NET developers are baffled by the lack of a “Clear” method in the StringBuilder class.  For example, if you are using a StringBuilder in a loop, you may want to clear its contents at the beginning of each loop. Options to Clear a StringBuilder It turns out there are two common ways to clear a StringBuilder: Option

Share and Enjoy:
  • Digg
  • Google
  • del.icio.us
  • Technorati
  • Facebook
  • MySpace
  • TwitThis
  • Blogsvine
  • description
  • E-mail this story to a friend!
  • Ping.fm
  • Print this article!
  • Slashdot
  • Yahoo! Buzz