Download Logo

Interview framework

Define Input and Output Requirements How is the input stored? What kind of values are there? Are there any negative values? Will there be any empty data? Can I assume there is always valid input? Will the size/number of data be greater than integer max value? Are we returning indexes/data? What if there are multiple answers? Analyze Data Size, Range, and Scale How big is the size of input? Do we take into account integer overflow? Size of array or N or Length What should we do if the size of data count is greater than Integer range? Suggest we can use linked list own custom data type Consider the Runtime Environment What type of environment will the algorithm be running in? Can I modify the original data? Can I use the latest language features? Walk Through Your Solution Approach Start writing comments in the editor. ...

July 12, 2024 · 2 min · 230 words · PrashantUnity
Download Logo

.NET assemblies

Assembly Overview Assembly is unit of deployment like EXE or a DLL When you create a code and build the solution, then the .NET Framework convert your code into Intermediate Language and that is placed inside the assembly(dll), which you can find inside bin folder Assembly: A compiled code library in .NET that contains types, resources, and metadata. Types of Assemblies: Executable (EXE) and Library (DLL). Components: Manifest, metadata, IL code, and resources. ...

August 3, 2024 · 1 min · 89 words · PrashantUnity
Download Logo

ViewBag & friends

Data Passing Between Controller and View Using Form Like POST Method ViewBag.Number and (int)ViewData[“Number”] from controller to View Controller to Controller TempData 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 public ActionResult SubmitForm(MyModel model) { if (ModelState.IsValid) { // Process the form data // Store a success message in TempData TempData["Message"] = "Form submitted successfully!"; // Redirect to another action return RedirectToAction("Confirmation"); } return View(model); } public ActionResult Confirmation() { // Retrieve the message from TempData ViewBag.Message = TempData["Message"]; return View(); } 1. Using ViewData ViewData is a dictionary-based way to pass data to the view. It uses the ViewDataDictionary class and is accessed by string keys. ...

August 3, 2024 · 2 min · 374 words · PrashantUnity