This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!span asp-validation-for="phone" class="divPhone"></!span> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //HTML Helper | |
| @Html.TextBoxFor(model => model.CompanyName, new { @class = "form-control", placeholder = "Enter Your Company Name" }) | |
| //content with tag helper | |
| <input asp-for="CompanyName" placeholder="Enter Your Company Name" class="form-control" /> | |
| //Equivalent HTML | |
| <input placeholder="Enter Your Company Name" class="form-control" id="CompanyName" name="CompanyName" value="" type="text"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class Startup | |
| { | |
| public void ConfigureServices(IServiceCollection services) | |
| { | |
| ...... | |
| ....... | |
| services.AddSession(); | |
| services.AddMvc(); | |
| } | |
| public void Configure(IApplicationBuilder app, IHostingEnvironment env) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public void Configure(IApplicationBuilder app) | |
| { | |
| app.Map("/path1", Middleware1); | |
| app.Map("/path2", Middleware2); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class TC | |
| { | |
| public static void Main(string[] args) | |
| { | |
| CreateWebHostBuilder(args).Build().Run(); | |
| } | |
| public static IWebHostBuilder CreateWebHostBuilder(string[] args) => | |
| WebHost.CreateDefaultBuilder(args) | |
| .UseStartup<TestClass>(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public interface IOrders | |
| { | |
| void SaveOrders(string OrderNo); | |
| string GetOrder(string OrderNo); | |
| void CancelOrder(string OrderNo); | |
| } | |
| public class Order : IOrders | |
| { | |
| public void SaveOrders(string OrderNo) | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| public class Program | |
| { | |
| public static void Main() | |
| { | |
| Car car = new Mercedes(); | |
| Console.WriteLine(string.Concat("Mercedes Car Color is: ",car.ListColor())); | |
| car = new Wolkswagen(); | |
| Console.WriteLine(string.Concat("Wokswagen Car Color is: ",car.ListColor())); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public Interface IEmployee | |
| { | |
| void SaveEmployee(); | |
| } | |
| public class Employee | |
| { | |
| IEmployee _employee; | |
| public EmployeeStatistics(IEmployee Employee) | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public interface IClass | |
| { | |
| void Classes(); | |
| } | |
| public interface ISubjects | |
| { | |
| void Subjects(); | |
| } | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class Account | |
| { | |
| public decimal CalculateInterest { get; set; } | |
| public decimal CalculateInterest(string accountType) | |
| { | |
| if (accountType == "Regular") | |
| { | |
| // do here regular account type logic | |
| } |