C#
C# is a versatile, object-oriented language from Microsoft used for enterprise applications, game development with Unity, and cloud services. Dive into .NET ecosystem tips and patterns.
24 articlesKafka - How to Get Started
2022/07/09·1 min readA beginner's guide to getting started with Kafka, including setting up a cluster, creating topics, and producing and consuming data with C#.
Use Sqllite at Xamarin.Form
2017/03/31·1 min readThis blog provides how to set up an Environment to use SQLite.
.NET Compiler Roslyn
2016/12/31·3 min readFew tips about .NET Compiler Roslyn.
Generate PokemonGo RPC Protos to C#
2016/07/13·2 min readHow to generate Pokemon Proto API to C# types
Getting Started with Azure WebJob
2016/02/03·3 min readThis blog shows how to use Azure WebJob to run background tasks.
C# RSS Reader Publish Date Issue
2015/12/31·2 min readHow to handle C# RSS reader publish date parsing issues when using SyndicationFeed, with an alternative XDocument approach.
Sample Code - Use ASP.NET MVC With Razor
2015/10/31·1 min readA sample showing how to use one ASP.NET MVC action to handle multiple page data using Razor ViewBag and a page data model.
ASP.NET Route All URLs to a Single Action
2015/10/31·1 min readHow to configure ASP.NET MVC routing to direct all URLs to a single controller action, and how to define specific routes before the catch-all route.
Sample Code - Google Map API - Get Location Info by Zipcode
2015/07/03·1 min readA C# code snippet to get location information such as state and county by zipcode from the Google Map API.
How to Configure NLog to Log to File, Database, and Send Email
2015/05/01·1 min readThis blog shows an example of how to configure NLog to log to a file, a database, and trigger a class call.
Override Connection String at NLog Config Setting
2015/05/01·1 min readYou can define log-to-database settings in NLog, but you can't change the connection string depending on your environment. This blog shows how to change the connection string in C# based on your environment.
How to Add Item in Sitecore
2015/05/01·1 min readSample code showing how to programmatically add an item in Sitecore using C#.
How to Implement MongoDB TextSearch with C#
2015/01/31·1 min readSimple code snippet to use MongoDB C# text search.
Sample Code for Creating ASP.NET MVC
2015/01/03·2 min readA simple example demonstrating how to make ASP.NET MVC modular by dynamically adding MVC projects to a main web application.
Do You Know Random Will Generate the Same Result?
2014/11/01·1 min readA demonstration of how C# Random can generate the same result when instantiated multiple times, and how to fix it with a singleton pattern.
MVC Bundle and Minification at Sitecore
2014/11/01·1 min readThis blog shows how to enable ASP.NET Bundle & Minification for JavaScript and CSS in Sitecore.
How to perform Geospatial Queries by Using MongoDB with C#
2014/08/02·1 min readThis blog shows an example of how to use C# to perform location-based queries with MongoDB.
How to Use MongoDB TextSearch by Mongoose
2014/08/02·1 min readHow to use MongoDB text search
Set MongoDB GMT Time in C#
2014/06/07·1 min readHow to save DateTime as GMT/UTC time in MongoDB using C#.
How to Log All WebAPI Request Response at ASP.NET MVC
2014/05/31·1 min readExample code of logging every request, response, and exception when accessing an ASP.NET MVC 3 controller.
Simple Code to Setup WebApi with OData
2014/05/31·1 min readThis section show how to setup OData Web api
Code Snippet - How to Use Extension with Enum
2014/05/03·1 min readIn C# you sometimes need to convert an enum to an int value. This snippet shows how to create an extension method for enums.
How to Use Ninject as Dependency Injection with ASP.NET MVC
2014/04/05·2 min readHow to use Dependency Injection with Ninject in an ASP.NET MVC application.
Code Snippet - How to Add Index to Document at MongoDB C#
2014/03/01·1 min readA quick code snippet showing how to set up an index on a MongoDB document or subdocument field using C#.