614 1
How can I sort alphanumeric string list in C# (With & Without LINQ)?

I have a requirement in my project, in which I need to sort the string which has alphanumeric data like below

...
Type
Question
C# alphanumeric sorting linq
587 2
Getting error "Sequence contains no elements"

Hello, I am using the below code to fetch some data from database and getting the error "Sequence contains no elements"

 public static IEnumerable<CompanyLicenseKey> GetCompanyLicenseKey()
{
            OPEntities onepassDB = new OPEntities();

            //Let's get the onepass User model first
            var user = onepassDB.UserAccounts.Where(x => x.Email == OnePassUserAccountEmail).First(); //error in this line

            var userLicenseList = from c in user.CompanyProfiles
                                  join l in onepassDB.CompanyLicenseKeys.Where(x => x.IsDisabled == false)
                                  .Select(x => new { x.CRMID, x.LicenseKey, x.FriendlyName, x.ProductName })
                                  on new { c.CRMID } equals new { l.CRMID }
                                  select new Models.OnePass.CompanyLicenseKey { LicenseKey = l.LicenseKey, FriendlyName = l.FriendlyName, ProductName = l.ProductName };

            if (ProductName == "")
                return userLicenseList.ToList().OrderBy(x => x.FriendlyName);
            else
                return userLicenseList.Where(x => x.ProductName == ProductName).ToList().OrderBy(x => x.FriendlyName);
        }

Error image

...

Type
Question
C# entity-framework asp.net-mvc
578 1
Generic type array get and set in C# , how to make it work?

getting error While executing the code below in C#

...
Type
Question
C# generic-type-array array-get-set-value-in-C#
574 1
How to use Ajax Rating Control in listview?

I am using the AJAX Rating Control inside a ListView control, When I run the page it throws the error 'Specified cast is not valid'

Here Is the code 

...
Type
Question
c# asp-net ajax-rating-control listview
564 0
Abstract class in C#
This article provides you detail explanation of c# abstract keyword and class, with working example in console application.
Type
Article
C# c sharp abstract class abstract class and interface in c#

560 1
How to convert HTML text into plain text using C#?

I have a requirement in which I need to render/display plain text from HTML content, so I would like to know how can I do it using C#?

For example, below is my HTML code

...
Type
Question
C# HTML to plain text
558 2
What is the Difference between String and string in C#?

Although I have intermediate knowledge of asp.net & C#, but I am still not clear with what's the difference between String (capital S) and string in C#?

When to use which one?

Example code:

...
Type
Question
C# .net difference of String & string string
550 1
How can I put the values of database in array in ASP.NET MVC C# ?

How can I put the values of database in array in ASP.NET MVC C# ? 

...
Type
Question
C# ASP.NET MVC
542 0
C# Delegates explanation and it's use with Example
This article will help you explain what are the Delegates in C# with the example, its advantages and when we should use delegates.
Type
Article
C# c-sharp delegates explanation what are delegates in c# when to use delegates
536 2
How can i undo my last Commits on Git?

I have committed some files on my Git using Visual Studio, which i want to undo now, as the code and i want to change it without pushing it to server, i haven't pushed the committed files on server yet, so how can i achieve it using Visual Studio or with some other source?

 

...
Type
Question
git git-commit git-undo-commit git-revert

Page 8 of 12