Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between an App and Application in c#.net?

Tags:

c#

.net

wpf

Is there any difference between App and Application in c#?

I am trying to use App.current.Resources in control library which is loaded in main WPF application. But it is not possible in a straight way, but at the same time it is allowing me to use Application.current.Resources

Could anyone help me to understand the basic differences between these two. Is there any flaw on using Application.Current.Resources instead of App.current.Resources?

like image 445
Antony Avatar asked Jan 02 '14 06:01

Antony


People also ask

What is an app in programming?

An application, also referred to as an application program or application software, is a computer software package that performs a specific function directly for an end user or, in some cases, for another application. An application can be self-contained or a group of programs.

What does application or app mean?

An app, which is short for "application," is a type of software that can be installed and run on a computer, tablet, smartphone or other electronic devices. An app most frequently refers to a mobile application or a piece of software that is installed and used on a computer.

Why are apps called applications?

The word "application" is derived from the phrase "application software", which was intended to contrast against "system software" (IE operating system, drivers, etc).

What is difference between app and application?

Applications are software programs developed for end-users to accomplish specific computing tasks. Apps, on the other hand, mostly refer to programs developed for mobile devices. Both depend on the platform and operating system they were designed for.


1 Answers

App is the default class name for your Application. It will be defined in your project by autogenerated code as follows.

public partial class App : Application

So indeed both are same, You're accessing static Current property defined in Application class only.

Application.Current.Resources//Accessing current through base class
App.Current.Resources//Accessing current through derived class
like image 146
Sriram Sakthivel Avatar answered Sep 23 '22 20:09

Sriram Sakthivel