All posts by kalaksh
C# convert string to date
Hey there! If you’re working with C#, I’d be happy to help you out with converting a string to a date. All you need is the DateTime.Parse or DateTime.ParseExact method from the System namespace. It’s super easy! Using DateTime.Parse: If the date string format is recognized by the DateTime.Parse method, it can be directly used….
Get IP Address in Asp.net Core API
To get the client’s IP address in an ASP.NET Core API controller, Private IP Address var privateIPAddress = HttpContext.Connection.RemoteIpAddress?.ToString(); Public IP Address string url = “https//atulbaba.com”;var request = System.Net.WebRequest.Create(url);var getResponse = request.GetResponse();var reader = new System.IO.StreamReader(getResponse.GetResponseStream());var response = reader.ReadToEnd().Trim(); var responseArray = response.Split(new Char[] { ‘:’, ‘<‘ },StringSplitOptions.RemoveEmptyEntries); var publicIPAddresss = responseArray[6]; using Microsoft.AspNetCore.Mvc; using…
Best Interview Question on Angular?
What is Angular? Angular is a TypeScript-based open-source front-end web application framework maintained by Google and a community of developers. It’s designed to make both the development and testing of such applications easier. What is the difference between AngularJS and Angular? AngularJS (Angular 1.x) is an older version of the framework, while Angular (2 and…