8804 2
How to check if I am using localhost server or not in C# MVC?

I am trying to create a background job using hangfire as explained in this article "Background jobs in ASP.NET MVC C# using Hangfire.io" but I don't want to run this background jobs when working locally.

So, How can I check if I am on localhost in C# & ASP.NET MVC and not run this background jobs?

...
Type
Question
8763 1
How to make Group by in Linq work with possible null values, in C#?

I am trying to add List.GroupBy(a=>a.ProductType.Name).Select(a=>a.FirstOrDefault()), now here I can have null values for .ProductType or .name so how can I ignore null values in C#, so I can get proper results of GroupBy?

If I am using above query in C#, I am getting error

Object reference not set to an instance of an object

I tried to make it like List.GroupBy(a=>a.ProductType != null ? a.ProductType), but it doesn't work.

...
Type
Question
8500 1
Object Oriented Programming (OOPS) concepts in c# with example
OOP stands for Object Oriented Programming, in this article I have introduced you the concept of Object-Oriented Programming in C# with example
Type
Article
8462 0
How to get file extension or file size in C# ? ( Code With Example )
In this tutorial article, I have provided sample code with examples, which shows how to get file extension from file name and file size in C#
Type
Article
8451 0
Interface in C# (With Example)
In this article, I have explained about Interface in C#, when to use it and why do we need it with an example.
Type
Article


8358 2
DbArithmeticExpression arguments must have a numeric common type

When I am trying to run this command using Entity framework in controller of my project

...
Type
Question
8308 0
Sealed Class in C# (Explanation with example)
This Article provides you complete information with working example of sealed class and methods in C# and how it can be useful for you.
Type
Article
8209 0
Understanding Enums in C# & it's advantages with example
This article will give you introduction of Enums in C# and will help you understand where we should use it in real world and gives it advantages.
Type
Article
7834 0
How to read and write in Console app using C#?
In this article, I have explained how to read and write in C# console applications using Console.ReadLine(), Console.WriteLine() methods in C# for basic, input and output using Console.
Type
Article
7795 3
How to remove server headers from IIS in ASP.NET MVC easily, need step by step guide?

How do I remove unnecessary HTTP Headers in IIS and ASP.NET application simply, please provide me step by step tutorial for improving security in this area?

I have already googled this and found few solutions but I need an easy tutorial, which can guide me to remove all unnecessary HTTP Headers from Response.

Any link or step by step guide will work.

...
Type
Question

Page 8 of 24