Tag Archives: C#

How To Programmatically Flush log4net Message Buffer

If you have set a buffer size on one or more of your log4net appenders, the logger will buffer the messages before dumping them, for instance, into a file or a database. That optimizes the performance but what if you … Read More »»»

Posted in C# | Tagged , , , , , , , , | Leave a comment

How To Launch Your Console Application With A Maximized Window

Forgetting your old school CGA, EGA and then VGA displays of rich 8-bit color, 80×25 displays, we now can have all that screen in a console application, all in a window. A console window you can resize, minimize or maximize … Read More »»»

Posted in .NET, C#, Coding, System | Tagged , , , , , | Leave a comment

Domain Objects with Circular or Backwards References In C#, Serialization via JSON and Getting Them Across the Wire

There are always times when your child DOM object references a parent object that contains a list of them children DOM objects that, of have a parent, creating a rather nasty but simply to solve dilemma of circular reference. I’ll … Read More »»»

Posted in C# | Tagged , , , , , , , , , | Leave a comment

New Features of C# 6 You May Find Quite Useful

C# version 6 came out with the release of Visual Studio 2015. It includes quite a few useful features for the developers. Here is a list of the ones that will make a day for any developer who has been writing … Read More »»»

Posted in C# | Tagged , , , , , , , | Leave a comment

How to Sign an Assembly With Strong Name

It is, indeed, a trivial task but you may come across errors from other DLLs that require you to sign your library. The task to do that is rather simple: Open a command prompt and run: “C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX … Read More »»»

Posted in Quick Tips | Tagged , , , , , | Leave a comment

Just Young Is C# 6, And Here Comes C#7! What is New in C# 7 and What To Expect?

It has not been long since C# 6 release with a few useful improvements, and here comes C# 7 – excited yet?! Watch your recliner and read on: Tuples I have not used that much so please go ahead and … Read More »»»

Posted in C# | Tagged , , , , , , | Leave a comment

C# Yield Statement Demystified With Examples

The yield statement has been released with .NET 2.0 framework, but many still do not know what it does. In a nutshell, it does transformations – obtaining a result dataset given an input dataset. Since the time yield has seen … Read More »»»

Posted in .NET | Tagged , , , , , , , , | Leave a comment

How to Access Your Model Data in .NET MVC With Razor Engine for Beginners

It may be a little frustrating to start your first MVC application using Razor engine, especially if you have never used it before. Here are some interesting pointers for beginners: First, when you created your first solution, Visual Studio will … Read More »»»

Posted in MVC | Tagged , , , , , , , | Leave a comment

Create a SQL CLR Stored Procedure Using .NET (C# Example)

T-SQL is limited in its functions and getting the results you need sometimes becomes very complex and the statements used consequently hard to decipher. With SQL Server 2005, Microsoft introduced CLR (Common Language Runtime) technology which allows you to use … Read More »»»

Posted in C# | Tagged , , , , , , , , , , , , | Leave a comment

Microsoft .NET MVC Framework: How to Use Named Anchors (URL Hash Links) in Html.ActionLink

In HTML you can specify which part of the page you want to scroll to if a user clicks on a page using the hash symbol (#) like this: My Topic … Given how MVC works differently and the URL … Read More »»»

Posted in MVC | Tagged , , , , , , , , , , | Leave a comment