Posts

Showing posts from September, 2019

Java 17 for Absolute Beginners: A Complete Guide to Get Started with Java Programming

Want to start learning Java programming ? This guide is just for you. We’ll cover the basics of Java 17 in simple language— no experience needed! ✅ What You’ll Learn: What is Java? Java 17 Features ( for beginners) Basic Syntax Data Types Operators Conditionals Loops Functions ( Methods) Object- Oriented Programming ( OOP) New Java 17 features ( Text blocks, Records) Practice Program 📌 What is Java? Java is: ✅ A popular and easy- to- learn language ✅ Platform- independent ( write once, run anywhere) ✅ Object- oriented ( based on real- world objects) ✅ Used for apps, websites, games, and more Java 17 is the latest Long- Term Support ( LTS) version, released in 2021. 1. Java 17 Basic Syntax Every Java program has a class and a main() method. public class HelloJava {     public static void main(String[] args) {         System.out.println("Hello, Java 17!");     } } 🔹 Notes: public cla...

Filter DataGrid and ListView in wpf using ICollectionView

Image
EmployeeDetails.xaml <UserControl x:Class="PrismMain.Views.EmployeeDetails"         xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"         xmlns:d="http://schemas.microsoft.com/expression/blend/2008"         xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"         xmlns:local="clr-namespace:PrismMain.Views"         mc:Ignorable="d"        >     <Grid HorizontalAlignment="Stretch" VerticalAlignment="Top" Margin="0,50,0,0">         <Grid.RowDefinitions>             <RowDefinition Height="50"/>             <RowDefinition Height="*"/>             <RowDefinition Height="*"/> ...

How to use Prism Region in WPF?

Image
Step 1: Install Prism.Core,Prism.DryIoc (You can use any IOC like Prism.Unity),Prism.Wpf. Step 2: Add the prism namespace to  MainWindow.xaml   like below                            xmlns:prism="http://prismlibrary.com/" Step 3: Add ContentControl  to  MainWindow   and initilize the RegionName <Grid>         <ContentControl prism:RegionManager.RegionName =" MainRegion "/>     </Grid> Step 4: Implement IModule  class MainModule : IModule     {         public void OnInitialized (IContainerProvider containerProvider)         {            var region= containerProvider.Resolve<IRegionManager>();             region.RegisterViewWithRegion(" MainRegion ", typeof( TabView ));       ...

Is it possible not to implement interface method in implementation class?

Yes, it is indeed possible to avoid implementing interface methods in the implementation class. To achieve this, you can declare the methods you don't wish to implement as abstract within the interface. By doing so, you'll need to mark the class as abstract as well. This allows you to provide the implementation of the method in a derived class of the abstract class. Let's take an example scenario using C#: interface ITest  {         void Sum();  } abstract class SumTest : ITest  {        public abstract void Sum();  } In this code, the SumTest don't have the implementation of the Sum() method. This approach can be useful when you require a method implementation but don't want to provide it immediately. By using the abstract modifier, you're indicating that derived classes should implement this method. This flexibility is particularly helpful when you want to delay the implementation until a more appropriate time. ...

What is Abstraction in C#?

The process of defining a class by providing the necessary and essential details of an object to the outside world and hiding the unnecessary things is called abstraction in C#. In C# we can hide the member of a class by using private access modifiers. Let us understand this with a car example. As we know a car is made of many things, such as the name of the car, the color of the car, gear, breaks, steering, silencer, diesel engine, the battery of the car, engine of the car, etc. Now you want to ride a car. So to ride a car you should know function of Gear,Break and Steering you no need to know engine of the car.so here in case of abstraction we can hide engine details so to do that make engine function private inside class and all require thing what we should know make it's function public.