Vertical Slice Architecture, not Layers!
Why Vertical Slice Architecture? Nobody wants to deal with a system that is hard to change and easy to introduce bugs because it's a spaghetti code mess of various technical concerns. Clean Architecture is popular because it separates concerns into many different layers. But why are we organizing code by layers? Does adding a new feature require you to modify files across multiple projects in your UI, business, and data access layers? Vertical Slice Architecture is about how you organize code and focus on features instead of technical layers will make your system easier to change.
private Document oDoc; public void createdoc1() { var realpath="~/template"; var filePath = Path.Combine(HttpContext.Current.Server.MapPath("~/template"), Lcourseid.Text + ".doc"); var oWordApplication = new Application(); DirectoryInfo dir = new DirectoryInfo(Server.MapPath(realpath)); foreach (FileInfo files in dir.GetFiles()) { files.Delete(); } // To invoke MyMethod with the default argument value, pass // Missing.Value for the optional parameter. object missing = System.Reflection.Missing.Value; //object fileName = ConfigurationManager.AppSettings["DocxPath"];@"C:\DocXExample.docx"; string fileName = @"D:\template1.dot"; //string fileName1 = @"D:\sss.doc"; object newTemplate = false; object docType = 0; object isVisible = true; //System.Reflection.Missing.Value is used here for telling that method to use default parameter values when method execution oDoc = oWordApplication.Documents.Open(fileName, newTemplate, docType, isVisible, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing); // usable in earlier versions of Microsoft Word v2003 v11 // if(Convert.ToInt16(oWordApplication.Version) >=11) { //Sets or returns a Boolean that represents whether a document is being viewed in reading layout view. oDoc.ActiveWindow.View.ReadingLayout = false; } //The active window is the window that currently has focus.If there are no windows open, an exception is thrown. //microsoft.office.tools.word. oDoc.Activate(); if (oDoc.Bookmarks.Exists("Title")) { oDoc.Bookmarks["Title"].Range.Text = "Test Field Entry from webform"; oDoc.Bookmarks["Address"].Range.Text = "Address Field Entry from webform"; } oDoc.SaveAs(filePath, ref missing); oWordApplication.Documents.Close(ref missing, ref missing, ref missing); //oWordApplication.Quit(ref SaveChanges, ref missing, ref missing, ref missing); ProcessRequest(filePath, Lcourseid.Text);
dnSpy is a debugger and .NET assembly editor. You can use it to edit and debug assemblies even if you don't have any source code available.
Some Features
- Debug .NET Framework, .NET Core and Unity game assemblies, no source code required
- Set breakpoints and step into any assembly
- Locals, watch, autos windows
- All metadata can be edited
- Edit methods and classes in C# or Visual Basic with IntelliSense, no source code required
- Add new methods, classes or members in C# or Visual Basic
- IL editor for low level IL method body editing
, What Every JavaScript Developer Should Know About ECMAScript 2015 is the book I'd like to read about the new features in the JavaScript language. The book isn't a reference manual or an exhaustive list of everything in the ES2015 specification. Instead, I purposefully selected what I think are the important features we will use in everyday programming.
تفاوت انواع var و dynamic
The dynamic keyword acts as a static type declaration in the C# type system. This way C# got the dynamic features and at the same time remained a statically typed language.
http://msdn.microsoft.com/en-us/magazine/gg598922.aspx
شاید اگر بگوییم dynamic نوعی static است که مزایای انواع dynamic را در بر میگیرد بهتر باشد.
خواندن این مقاله هم خالی از لطف نیست:
5 آنتی ویروس رایگان برای ویندوز
Hackers are smart and users are not being able to cope with their pace of evolution. The result is malware outbreaks we get to know about frequently. Windows is the most widely used OS on Pcs. That makes it the most widely targeted OS too. What is an average user’s (by average I mean not too technical) defense in such case? The anti malware programs. Of course, you have to pay a decent price for your PC to be secured from latest malware derivatives, but what’s better than to get the security for no cost?