Questions




Answers
1
How can I initialize Multidimensional Array [][] in c# with int [3][3]?

Hi, How can I initialize Multidimensional Array [][] in c# with int [3][3] (3 rows and 3 columns )? Like below

...
Read More
C# 3D-array-initialization
Answers
1
Error : Wrong number of indexes '2' inside [], expected '1' Compilation failed in C# 2-D array

Hi, I am trying to run the below C# code for martix, but getting error

...
Read More
C# multi-dimensional array
Answers
2
How to subtract total of each row in C# matrix from constant number and sum the result?

Hi, I would like to know how to subtract total of each row in C# matrix from a magic constant number(example : 15) and sum the result, for example, here is my current matrix

...
Read More
c# C# matrix Subtraction
Answers
1
How to enable SSL in locahost using Visual Studio 2017?

Hello, I was trying to Enable SSL in localhost, means want to turn http into https in localhost , while debuggind code in Visual Stduio 2017, how can I enable this in Visual Studio 2017 community edition?

...
Read More
Visual Studio localhost ssl certificate localhost ssl
Answers
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

...
Read More
C# alphanumeric sorting linq
Answers
2
Find duplicate array elements & count its occurence in c#

Hi, I have to find the repetition of number of occurence of an element in an array in c#, here is my current code for simple array

...
Read More
C# Array
Answers
1
Datepicker is not working inside bootstrap modal pop-up

I am using jQuery Datepicker inside a page, which works when complete page is loaded in browser, but when I load the same page in bootstrap modal pop-up, jQuery datepicker inside it doesn't work.

Not sure how to solve it, here is my textbox HTML

...
Read More
jQuery Javascript datepciker inside modal pop-up
Answers
2
Course to learn about matrix (two dimensional array) in C# with exercises and solution

Hi,please someone can give me link to learn about matrix (two dimensional array) in C# with exercises and solution. Thanks in advance.

...
Read More
c# c# multidimensional array matrix
Answers
1
ASP.NET Core - Dependency Injection

My controller:

    [Route("api/[controller]")]
    [ApiController]
    public class CategoriesController : ControllerBase
    {
        private readonly IUnitOfWork unitOfWork;

        public CategoriesController(IUnitOfWork unitOfWork)
        {
            this.unitOfWork = unitOfWork;
        }

        [HttpGet]
        [Route("TestCategories")]
        public ActionResult<IEnumerable<Category>> TestCategories()
        {
            return unitOfWork.Categories.FindAll().ToList();
        }
    }

My Startup:

        public void ConfigureServices(IServiceCollection services)
        {
            services.Configure<CookiePolicyOptions>(options =>
            {
                // This lambda determines whether user consent for non-essential cookies is needed for a given request.
                options.CheckConsentNeeded = context => true;
                options.MinimumSameSitePolicy = SameSiteMode.None;
            });

            services.AddDbContext<ClassifiedAdsDbContext>(options => options.UseSqlServer(Configuration.GetConnectionString("DefaultConnection")));
            services.AddScoped<IUnitOfWork, UnitOfWork>();
            services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
        }

I did break my app so i can understand how the codes work.

As you can see on my controller i used IUnitOfWork (Interface that comes from MyProject.Domain - class library) 

Scenario:

  1. if i use the UnitOfWork class, the only thing the i need to inject (to startup.cs) is the UnitOfWork class only.
  2. if i use the IUnitOfWork interface. i need to inject both (to startup.cs) IUnitOfWork interface and UnitOfWork class as well because it gives error see below.

...

Read More
ASP.NET Dependency Injection
Answers
2
PagedList in BootStrap pop-up Modal using Asp.Net CORE MVC

I am showing some data in modal pop-up using BootStrap .Basically I am using for each loop for displaying Data. So I would like to know, How To apply paging in these scenario using PagedList asp net core mvc or any other plugin in pop-up modal.

thank you

...
Read More
asp net core mvccore netcore

Page 10 of 42