C# Corner

Resources  
  • Knowing When To Reflect With Caller Info AttributesDec 10, 2017. If you've been around C# long enough, you've probably had a need at one time or another to figure out some information about code that's being executed. It might be a method name, the file being executed, or even more specific details like the line number.
  • Understanding Classes In KotlinDec 07, 2017. In the above example, I have created a nested class ‘Nestedclass’ which has a data member ‘b’ and a member method show(),now the object of nested class can access member of nested class only.
  • Aspect Oriented Programming In C# Using DispatchProxyDec 06, 2017. Example of implementing logging using Aspect Oriented approach with DispatchProxy class.
  • Accessing Azure Key Vaults Using Certification Dec 05, 2017. In the old days, we used to access the Azure Key Vaults using Vault URL and its Secret Key, we were placing this in config file and going from there.
  • Display Sub Directories And Files In TreeViewDec 05, 2017. Display Sub Directories and Files in Treeview, Tooltip in Treeview Nodes, Loading Files in Treeview, Display image icon in TreeNode.
  • Work With External AppSetting Of Web.ConfigDec 01, 2017. In this article, you will learn about .NET Configuration Files
  • Mounting Azure File Share With WindowsNov 30, 2017. This article shows how to create an Azure Storage account
  • Routing In Suave.io - Web Development With F#Nov 29, 2017. A web application is generally composed of multiple “routes”. A route means a URL that does not necessarily map a physical file, you can use routes to define some URLs that are semantically meaningful to the user.
  • Comparing Objects In C#Nov 29, 2017. In this article, we are going to compare two objects of the same class having collection property or multiple collection properties.
  • Building Entity Framework Disconnected Generic RepositoryNov 29, 2017. The repository pattern separates and retrieves data model mapping logic from the business logic. We will create a repository class for each entity class in our application. All these classes usually have a main group of equals methods.
  • Saving Your Ruby On Rails Application Code To Github.comNov 28, 2017. In this article you will learn git configuration in git bash and git hub repository creation, add new ssh key in git hub and finally add all application files into git hub repository via remotely using with git bash for Ruby on Rails application version controlling.
  • Progress Bar Android App Using Android StudioNov 28, 2017. In this article, I will show you how to create a Progress bar android App using Android studio. We can display the Android progress bar dialog box to display the status of work being done e.g. downloading file, analyzing status of work etc.
  • Convert XML File To Excel FileNov 27, 2017. Here, we are going to learn to read XML files in C# WindowsForm applications. We are going to make a small single-form application which takes an XML file from the user and convert XML Data to Excel Data and Returns an Excel File.
  • Configuring Log4Net With Database - A Tutorial For BeginnersNov 26, 2017. Log4Net is a framework for logging .NET applications. It is an open source library that can be used to log output for different targets like logging output in Text files, Database, Console, Mail (SMTP), Remote and others. In this article, I will explain how to log output in a database.
  • Transform Web.Config File While Deploying The Web Application ProjectNov 25, 2017. One of the nice features that supports Visual Studio 2010 and above versions is Web.Config (XDT) transformations.
  • MVC 5 Demo Project With Entity Framework (DB First)Nov 23, 2017. MVC project has been set up. Now, make a new C# class library project which will act as a DAL layer and Entity Framework will be handled through this project.
  • Copying A File In Node.js v8.5Nov 22, 2017. In this article, I will explain how to copy a file using the brand new Node.js version 8.5.
  • ASP.NET Core 2.0 Secret ManagerNov 22, 2017. I discussed in the previous post how configuration settings can be stored in configuration files. However, these files are checked in the source control and not suitable to store confidential settings. In a production environment these settings can be stored in environment variables or Azure Key Vault however, for development ASP.NET Core provides an alternate solution: Secret Manager.
  • Uploading, Validating, And Storing A File Into Database Using EF In ASP.NET MVC5Nov 20, 2017. Here, you will learn how to upload a file, validate a file and store a file into database using JQuery, Entity Framework in ASP.NET MVC5
  • How to Return Files From Web APINov 18, 2017. This article explains how to transfer/ return files(PDF/Doc/Excel/zip) files from Web API service
  • Create App Using Xamarin.Android Using C# - Part FourNov 17, 2017. Xamarin.Android has native user interface controls. These controls can be easily added to Xamarin.Android apps using the Android Designer or programatically via XML layout files. Xamarin.Android exposes all of the user interface object properties and methods in C#.
  • Passing Parameters To Middleware In ASP.NET Core 2.0Nov 15, 2017. I discussed in an earlier post that it is good practice to define middleware in a separate class and add to the pipeline using extension methods. We may also need to pass information to our middleware classes though and I’ve come across two patterns for this when digging into ASP.NET Core source code and other samples online.
  • What Is Struct And When To Use Struct In C#Nov 15, 2017. 'Struct' keyword is used to create a structure. A structure can contain variables, methods, static constructor, parameterized constructor, operators, indexers, events, and property. A structure can not derive/inherit from any structure or class. A structure can implement any number of interfaces. Structures provide better performance.
  • Creating Azure WebJob To Access SharePoint Using Typescript And Node.jsNov 14, 2017. Create a new folder in the solution by the name 'src' and create index.ts file inside the folder. In this folder we will keep all the source files which will get executed when the Job runs. Remember to keep the index.ts at the root of the src and all other files (if any) keep them in the folder otherwise the job will fail.
  • Azure Table Storage In ASP.NET Core 2.0Nov 14, 2017. Add a class to encapsulate storage access. Add a private helper method to access storage
  • How To Use StringBuilder And File Class For .NET ApplicationNov 14, 2017. Here, I am going to share how and why should we create error log in our application.
  • Introduction To Xamarin.Android Using C# - Part OneNov 10, 2017. Xamarin.Android will create native Android applications using modern language (C#), .NET Base Class Library Visual Studio. Xamarin is a cross-platform development tool. It solves dilemmas many developers face when developing cross-platform apps: separate coding languages and UI paradigms. With Xamarin, you can use C# for iOS, Android, and Universal Windows apps. And with Xamarin Forms, interface design for all three platforms can be accomplished within its XAML-based framework.
  • Upload/ Download Files In ASP.NET Core 2.0Nov 10, 2017. ASP.NET Core MVC model binding provides IFormFile interface to upload one or more files. The HTML form must have encoding type set to multipart/form-data and an input element with type attribute set to file.
  • How To Extract All Images From An Existing PowerPoint PresentationNov 09, 2017. This article will give you the steps to save all the images from a PowerPoint presentation file.
  • Angular Basics and Quickstart with CLINov 09, 2017. Imagine what it would be to manually add the configuration files required to bootstrap an Angular 4 application. It is painful, right? For beginners, it might become tedious to declare all these files and manually configure all these files to bootstrap the app. It wouldn't be a good idea to set up the configuration things rather than focus on the framework and its usage. Even for the advanced developer, it might not be a great way to do all these things manually. So, Angular CLI is the solution here
  • If The Boot Configuration Data For Your PC Is Missing Or Contains ErrorsNov 06, 2017. The Boot Configuration Data (BCD) is a firmware-independent database for boot-time configuration data. It is used as new Windows Boot Manager. It replaces the "boot.ini" file that was used in the old Operating System. For more details check Windows startup process.
  • Power BI And Excel File As Data SourceNov 06, 2017. Though we have several options for data sources to connect with Power BI in this blog, I am going to write about how we can use Excel data with Power BI and how to refresh the report when Excel data is changed.
  • URL Routing Of ASP.NET MVC And ASP.NET Web FormsNov 06, 2017. Asp.Net MVC has route-based URLs which means URLs are divided into controllers and actions; and moreover, it is based on controller not on physical file.
  • Binding DropDown List Using Tuple In ASP MVCNov 05, 2017. Tuple is a generic static class that was added to C# 4.0 and it can hold any amount of elements, and they can be any type we want. So using tuple, we can return multiple values.One great use of tuple might be returning multiple values from a method. It provides an alternative to "ref" or "out" if you have a method that needs to return multiple new objects as part of its response.
  • Three Digit Sum Using Tuple in C#Nov 02, 2017. In this article, we will be discussing an algorithm which returns possible (no. of pairs) digit pairs that are equal to a given number (6) using Tuple class.
  • SystemDataPaths In UWP (Windows 10 Fall Creators Update Features)Oct 31, 2017. This article explains about how to get system , app , user based path information. This SystemDataPaths, UserDataPaths, AppDataPaths class will be supported on Windows 10 Fall creators updated version build or greater and Windows 10 SDK 16999.
  • ASP.NET Core 2.0 MVC RazorOct 31, 2017. ASP.NET Core MVC middleware will find and execute the Razor template (.cshtml file) when the Controller returns ViewResult. Razor templates use syntax that combine C# and HTML to produce the final HTML page.
  • Add Class Library In ASP.NET Core Using .NET Core Command-Line Interface (CLI)Oct 29, 2017. This article explains how to add Class Library in ASP.NET Core using .NET Core Command-Line Interface (CLI) with a simple way. Before reading this article, read the previous parts of this article using below article link.
  • Getting Started With Receipt Card Design Using Microsoft Bot FrameworkOct 29, 2017. The Bot Framework supports different type of rich cards and provides a richer interaction experience to the user. In this article, I will show how to integrate Receipt card UI design in a Bot Application. If you are developing a shopping card Bot chat application; receipt card is very important. Receipt card class has property as a list of items, total, tax, vat, title and image. We can re-use all receipt card properties and add tab action event for navigating to original invoice website.
  • Debugging Tips - Part TwoOct 27, 2017. While working on complex classes/objects, it really takes two more clicks to either add that object to the Watch window or expand the object in visualizer and navigate to a specific property.
  • Office 365 Public CDN OverviewOct 27, 2017. Microsoft has recently announced (over a months’ time ago now as I am writing this article) availability of Office 365 Public Content Delivery Network (CDN). This gives us the good option to host the static content such as JavaScript files, CSS, images, documents in CDN. The files in CDN will help better performance with SharePoint pages.
  • How To Read CSV File In ASP.NET With Example C# and VB.NETOct 26, 2017. In this articleI'll explain a way to upload, read/browse and show CSV file (Text File) information in ASP.Net GridView using C# and VB.Net.
  • Creating A Comment Box Using Angular 1.0.7Oct 25, 2017. AngularJS is a JavaScript framework. It is a library written in JavaScript. AngularJS is distributed as a JavaScript file, and can be added to a web page with a script tag.
  • Setting Or Retrieving Geotag In Media File In UWP With XAML And C#Oct 25, 2017. Reading this article, you can learn how to set or retrieve Geotagging in Media File in Universal Windows Apps development with XAML and Visual C#.
  • Debugging Tips - Part OneOct 24, 2017. A cool attribute to save some debugging time is DebuggerTypeProxy (Namespace: System.Diagnostics). Using this attribute, you can write your own logic to interpret the object at debug time. Meaning, if you have a list of class objects then you can project on certain properties and force debugger to show the value off of this proxy class. This attribute is applicable to Structures, Classes and Assemblies.
  • Generate PDF From An HTML Page Using AngularOct 24, 2017. In this article, I am going to explain how to generate PDF file from an HTML page using AngularJS in SharePoint. This is the effortless way to port the SharePoint list data or any other list data to carry, print, and make a hard copy.
  • An Easy Way To Encode And Decode File In ASP.NETOct 13, 2017. In this article, I’ll explain a way to encode and decode a file in ASP.NET using C# and VB.NET with example.
  • Read Excel File In C# WinFormOct 13, 2017. Here we are going to learn to read Excel files in C# windows form applications.
  • Getting Started With Entity Framework Core - Database-First DevelopmentOct 12, 2017. This article is the first part of the series on Getting Started with Entity Framework Core. In this post, we will build an ASP.NET Core MVC application that performs basic data access using Entity Framework Core. We will explore the database-first approach and see how models are created from an existing database. We will also take a look at how classes become the link between the database and ASP.NET Core MVC Controller.
  • How To Send Notification Via SMS When Dropbox Is Modified With Microsoft FlowOct 12, 2017. This article helps you to learn how to notify someone via SMS when a Dropbox file is modified through Microsoft Flow.
  • Angular Components (With Examples)Oct 12, 2017. A Component is nothing but a simple typescript class, where you can create your own methods and properties as per your requirement which is used to bind with an UI (html or cshtml page) of our application.
  • ASP.NET Core 2.0 File ProvidersOct 11, 2017. ASP.NET Core provides an encapsulation of System.IO.File type in order to limit the access to file systems via PhysicalFileProvider type, which is an implementation of IFileProvider.
  • Excel To XML Using LINQOct 11, 2017. In this article we will show you the easiest way to convert Excel data into Xml files. There is a certain way to convert Excel file to Xml, for example using Excel Library (Com Component)
  • Shared Storage Using Azure File ServiceOct 10, 2017. In most cases, the virtual disks we are creating for an Azure VM are connected to that particular VM with a 1:1 relationship which can’t be accessed by another VM at the same time. In case you need a shared storage by multiple VMs you should use Azure File Shares. Azure File shares can be mounted concurrently by cloud or on-premises deployments of Windows, Linux, and macOS. This is mostly used in case of any requirement of something like a shared application setting or if you need to share any tools or utilities between developers and administrators.
  • What Is Version Control And Why You Should Use ItOct 09, 2017. In this article, we will learn what Version Control is, and what are the benefits of version control. Version Control means keeping the copies of your code or files from every stage in its lifecycle. Version control system allows us to manage all versions of our code with representing single version at a time.
  • ASP.NET Core 2.0 Session StateOct 09, 2017. Using an empty project from a previous post, amend Startup class ConfigureServicee() method, and add services for session and its backing store.
  • Upload Multiple Files To SharePoint List On Single Click Using Angular And jQueryOct 07, 2017. This article explains how to upload more than one files into a SharePoint list on just single click using Angular and jQuery.
  • Sending Bot Reply Message With Attachment Using Bot FrameworkOct 07, 2017. The Bot Framework enables you to build bots that support different types of interactions with users. You can design conversations in your bot to be freeform. Your bot can also have more guided interactions where it provides the user choices or actions. The conversation can use simple text strings, the message with an attachment like the image, File (pdf, word, excel, ppt), mp3, Video or more complex rich cards.
  • SharePoint OnPremises - Client Side File Upload Control And Uploading File In SharePoint Using Rest APIOct 06, 2017. In one of our SharePoint OnPremises projects, we have requirement to upload the user’s photo, his profile image in SharePoint Image library (PublishingImages). So we have implemented this feature using JavaScript and upload image in SharePoint Image library using rest API.
  • How To Connect OneDrive To Google Drive With Microsoft FlowOct 05, 2017. This article helps you to learn how to create a Flow between the OneDrive files and Google Drive files.
  • How To Log Messages (Information, Errors, Warnings) In ASP.NET CoreOct 04, 2017. Framework provides logging capability through ILoggerFactory, to which you could attach one or more providers. Providers act on the logged data in some form i.e., log it to file, database, Azure etc.
  • Create Power BI Report Using Twitter AnalyticsOct 04, 2017. In this article, we will learn how we can use Twitter analytics data and prepare Power BI Report. We can export Twitter analytics data in .csv format and consume that .csv file to prepare a Power BI report.
  • Manifest File In Progressive Web AppOct 01, 2017. In this article we will learn what the purpose of manifest.json file in a Progressive Web Application is.
  • Convert HTML Files To DOCX Files With MariGold.OpenXHTMLSep 30, 2017. This tutorial explains how to create an HTML to DOCX converter with a C# windows application.
  • ASP.NET Core 2.0 Error PagesSep 29, 2017. Starting from an empty project, created in a previous post, amend the Configure() method of Startup class to use middleware needed for error handling. Below I’ve used a custom middleware (defined as lambda) to handle production exceptions.
  • Hex File And ICSP Pins Of ArduinoSep 29, 2017. This article will provide you deep access to Arduino UNO. In this article we are going to see what are ICSP pins, AREF pins and .hex files. It is necessary to step ahead in each and every task we handle to survive in the current scenario.
  • Why "Service Locator" is an "Anti-Pattern" for Dependency InjectionSep 29, 2017. The Service Locator is used as a replacement for the new operator. The problem with service pattern is that it hides a class's dependencies and is a bonafide anti-pattern. In fact, it takes away a developer's clarity about the class he/she is using.
  • Steps To Fix Project File Could Not Be Loaded Issue After Rename Project In ASP.NET MVCSep 29, 2017. I created one MVC application named "SatyaExportMVC". Then I will rename it Satyaprakash of Project name and Solution file name.
  • Creating A Wave Audio Player Using WinMM The APISep 28, 2017. This is the part two of my three part trilogy concerning the use of windows mixer controls, playing an existing wave file through some available speaker, or recording and saving a wave file from an available audio input device such as a microphone. You might be wondering about the order I am presenting these tutorials. Simple, ...when my father taught me to play pool, we would often come upon a scenario where there are multiple shots available.
  • Create Value Object In C#Sep 28, 2017. Create a class that abstracts away (encapsulate) ‘data’ in your domain and provide methods to work on it. Below is a class I don’t consider a good Value Object.
  • Understanding And Controlling The Windows Mixer APISep 27, 2017. This tutorial is going to be a three part introduction to playing and recording audio files using winmm.dll (a WinAPI). This first part is about understanding, opening and controlling windows mixers. The other tutorials will be about recording and playing audio .wav files. We will not be working with .mp3 (you can see the documentation to understand those functions.)
  • Consume Local File System As A Data Source In Power BISep 27, 2017. We all know Power BI is a very good business intelligence tool. Sometimes there is a situation when we need to prepare report using file system. Power BI provides a connector to consume data from folder structure. We can get all files from a specific folder. But there is one limitation with this connector.
  • Default(T) In GenericsSep 27, 2017. Default represents default value of T parameter in generics intructions. In several cases, the default keyword is an absolute unknown and we think it’s unnecessary or its functionality is null. There are many development moments with the generics classes where the default keyword can be useful.
  • Understanding Cloud Storage In AzureSep 26, 2017. In this article, I will explain about Storage Accounts (Storage Accounts can hold hundreds of terabytes of data.) and we will see how we can use Azure Storage as a place to keep uploaded files for our web application and how we can allow users to download files from storage by creating and handling out what is known as a shared access signature (SAS).
  • What Is New In iOS 11?Sep 19, 2017. iOS 11 sets a new standard for the world’s most advanced mobile operating system. Your apps can now become more intelligent using the power of machine learning with Core ML. You can create incredible augmented reality experiences with ARKit. And you can deliver a more unified and immersive user experience with new multitasking features, including drag and drop for iPad, the new Files app, new camera APIs, new SiriKit domains, Apple Music integration, and more
  • Introduction To Tag Helpers In ASP.NET CoreSep 18, 2017. Tag helper is a new feature in ASP.net MVC. It enables server-side code to create and render HTML elements in Razor View. It is feature of Razor View engine. They are the C# classes which participate in view generation by creating the HTML elements. Using the tag helper, we can change the content of HTML element and add additional attributes to the HTML element. It is very similar to HTML helper in ASP.net MVC.
  • Serve Static Files In ASP.NET Core Using Visual Studio 2017Sep 18, 2017. This article explains about static files and how to set default page using static files in ASP.NET using Visual Studio 2017 in a step by step way.
  • Selection Manager For WPF/MVVMSep 17, 2017. This article presents the idea and implementation of a class to manage the selection of only one element in different linear and hierarchical structures.
  • File Upload With JQuery Progress Bar In ASP MVCSep 14, 2017. First we have to create an Asp Mvc project in visual studio. To do that, Open Visual Studio -> New Project -> A new dialog window will appear -> In left pane select C# ->select Web -> Select "ASP.NET MVC 4 Application" name your project and click ok.
  • ASP.NET Core 2.0 Static FilesSep 13, 2017. Static files can also be served from folders outside wwwroot by passing in StaticFileOptions to middleware and setting a FileProvider and RequestPath. This is useful when you want authorised access to files e.g. by returning FileResult action result from a secure controller.
  • ASP.NET Core 2.0 ConfigurationSep 11, 2017. ASP.NET Core has a simple mechanism to read application settings from various sources like JSON files, Environment variables or even custom data sources. It is also simple to use the settings, thanks to Dependency Injection.
  • SharePoint 2013 - On Premises - Powershell Script To Import Termsets On Given Site From .csv File In Specific FolderSep 10, 2017. In this article I’ll explain how to import multiple termsets using .CSV file from one specific folder.
  • Aspect Oriented Programming In C# With RealProxy classSep 07, 2017. Example of implementing logging using RealProxy class.
  • How Should We Store Images And Blob Files In SQL ServerSep 06, 2017. There is always a requirement from developers: How should I store images and BLOB files in SQL Server ? In this post let's explore the data types and methods used for storing Binary Large Objects also know as BLOBs, such as images and sounds, into SQL Server.
  • User Guide To Enroll iOS Device With Microsoft Intune And Configuring Outlook AppSep 04, 2017. If your company or school uses Microsoft Intune for Mobile Device Management and Mobile application management, you can enroll your iOS device to get access to company email, files, and other resources. When you enroll your devices, your IT department can manage the resources, keep them secure, and give you the freedom to use your preferred device to get your work done.
  • How To Perform Web Scraping Using Python ProgramSep 04, 2017. Web Scraping (also known as Screen Scraping, Web Data Extraction, Web Harvesting etc.) is a process to scrap (extract) data from web pages, web document, HTML document or XML document in a structured manner and then store in database, text file as a spreadsheet , as a XML , or in whatever file format we want to save in.
  • How To Perform CRUD Operation Using JSON File With Sorting And Paging In Angular - Part TwoSep 02, 2017. Today, in this article, I will explain performing CRUD operations in Angulars j. In my previous article I have retrieved records from json files with sorting and paging in. Now I will explain how to Insert, Update and Delete in angular js, and also with required filed validation. So let us go through step by step.
  • SharePoint 2016/2013/Online - How To Upload Files To SharePoint Document Libraries By PowerShell AutomationSep 02, 2017. In this demo we will explore the PowerShell code to upload the file to SharePoint Online/On Premise Implementations which represents just a part of the complete automation process.
  • Blocked File Types On Web Applications In SharePoint 2016 Central AdministrationAug 31, 2017. Here, you can define the file types that should be allowed or disallowed on SharePoint sites and collections. This configuration will apply globally on the complete farm.
  • Building A .NET Core 2.0 Class LibraryAug 31, 2017. In my previous tutorial, Getting Started with .NET Core 2.0, we learned how to build our first console app using .NET Core 2.0. We also learned how to package and deploy the application so it can be used by other users.
  • Create Migration File In Ruby On RailsAug 29, 2017. In this article you will learn to how to Create Migration files, migration models creation, what is migration, why use migration and how to run migration file in Ruby on Rails.
  • How To Perform CRUD Operation Using JSON File With Sorting And Paging In Angular - Part OneAug 21, 2017. How to perform CRUD operation with paging, sorting, validation and also using file upload control and retrieving the records from json file.
  • Reading An Excel File Using HTML 5 And jQueryAug 18, 2017. This article explains how to export data from an Excel file to an HTML table using jQuery & HTML5.
  • Using ERB Tags In Ruby On Rails Default HTML TemplatesAug 18, 2017. In this article, you will learn about the view templates, template file naming, ERB tags, and how to use ERB tags in HTML templates.
  • Resources In Xamarin.AndroidAug 17, 2017. When a new Android project is created, there are some files that are added to the project, by default. We call these default project files and folders as Android Resources.
  • To Overcome "HTTP Error 404.3 Not Found" Error While Playing Videos In ASP.NET Aug 17, 2017. To Overcome “HTTP Error 404.3 - Not Found THE PAGE YOU ARE REQUESTING CANNOT BE SERVED BECAUSE OF THE EXTENSION CONFIGURATION. IF THE PAGE IS A SCRIPT, ADD A HANDLER. IF THE FILE SHOULD BE DOWNLOADED, ADD A MIME MAP.” Error.
  • CRUD Operation With JSON File Data In C#Aug 15, 2017. This article will demonstrate how to implement CRUD functionality with JSON file in a project using C# code.
  • SharePoint 2016/2013/Online - How To Download SharePoint Files By PowerShell AutomationAug 12, 2017. In this article, we will explore the PowerShell way of downloading the files in SharePoint Document Libraries.
  • Dependency Injection - Part 3 - Implicit Vs Explicit DependenciesAug 12, 2017. If a component or class depends upon other components to complete its operations, then these other components are dependencies for this class. Our class can have these dependencies as implicit or explicit dependencies.
  • Download Files In Zip Format Using ASP.NET MVC Razor And SweetAlert LibraryAug 10, 2017. There are so many websites that display a list of files to the end user. The user can then select one or more files from the list and request a zipped bundle of those files as a single download. In this article, I will show you this implementation using MVC.

About File-class

NA
File APIs for .NET
Aspose are the market leader of .NET APIs for file business formats – natively work with DOCX, XLSX, PPT, PDF, MSG, MPP, images formats and many more!