<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Hamza</title>
    <description>The latest articles on Forem by Hamza (@1hamzabek).</description>
    <link>https://forem.com/1hamzabek</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1161197%2Faf27a6cf-2c4a-442c-8e91-08fc847a4caf.jpg</url>
      <title>Forem: Hamza</title>
      <link>https://forem.com/1hamzabek</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/1hamzabek"/>
    <language>en</language>
    <item>
      <title>Why People use Typing365?</title>
      <dc:creator>Hamza</dc:creator>
      <pubDate>Sun, 21 Sep 2025 04:22:57 +0000</pubDate>
      <link>https://forem.com/1hamzabek/why-people-use-typing365-2al5</link>
      <guid>https://forem.com/1hamzabek/why-people-use-typing365-2al5</guid>
      <description>&lt;p&gt;In a world increasingly dependent on digital communication, strong typing skills are no longer a “nice to have”, they’re essential. Whether you're a developer writing code, a content creator crafting articles, or just someone who spends a lot of time in front of a keyboard, speed and accuracy matter. That’s where Typing365 comes in: a desktop typing-practice app designed to help users improve their typing speed, precision, and overall efficiency. Here’s a look at what makes it compelling and why many people choose it.&lt;/p&gt;




&lt;h2&gt;
  
  
  What Is Typing365?
&lt;/h2&gt;

&lt;p&gt;Typing365 is a Windows-based application focused on helping users master touch typing. It offers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Multiple formats of typing exercises (classic literature, tech articles, single words, custom text) so you can practice with varied content. &lt;br&gt;
&lt;a href="https://typing365.app/" rel="noopener noreferrer"&gt;https://typing365.app/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Real-time feedback on both speed (words per minute, or WPM) and accuracy. &lt;br&gt;
&lt;a href="https://typing365.app/" rel="noopener noreferrer"&gt;https://typing365.app/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Progress tracking, including streaks, charts, error analysis, and other metrics to help identify weaknesses. &lt;br&gt;
&lt;a href="https://typing365.app/" rel="noopener noreferrer"&gt;https://typing365.app/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Support for multiple languages, useful for multilingual users or those learning a new language. &lt;br&gt;
&lt;a href="https://typing365.app/" rel="noopener noreferrer"&gt;https://typing365.app/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Competitive features: live typing races, global leaderboards, achievements.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Key Reasons Why People Use Typing365
&lt;/h2&gt;

&lt;p&gt;Here are the main advantages users report, and what sets it apart.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Native Desktop Experience&lt;br&gt;
Many web-based typing tools are good, but they require a browser and internet connection. Typing365 is a native app for Windows. That means better performance, less distraction, and often more reliable tracking. &lt;br&gt;
typing365.app&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Comprehensive Feedback &amp;amp; Analytics&lt;br&gt;
It’s not enough just to type fast — you also need to see where you make errors, which keys or key combinations are slowing you down, and how consistency is improving (or not). Typing365 provides detailed metrics, error-analysis, and trends over time so you can target weaknesses. &lt;br&gt;
typing365.app&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Motivation via Gamification&lt;br&gt;
Features like streaks, competitions, leaderboards, and personal goals help make practice more engaging. For many people, this makes the difference between practicing once in a while, and forming a habit. &lt;br&gt;
typing365.app&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Varied Material &amp;amp; Real-World Relevance&lt;br&gt;
Not everyone types code. Not everyone types essays. Some type chat messages; others type technical articles; still others type in more than one language. Typing365 caters to different contexts: literature, news, custom text, multilingual practice. That variety helps people build flexible typing skills. &lt;br&gt;
typing365.app&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Distraction-Free Environment&lt;br&gt;
Because it's a dedicated app, users aren’t tempted by browser tabs, ads, or other distractions. This can help with focus, which is especially important when trying to build muscle memory.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Offline &amp;amp; Always-Available Practice&lt;br&gt;
Even though some tools require internet access, Typing365 being desktop-based gives more reliability across different settings. Users can practice anytime, or whenever they have access to their PC.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Who Benefits Most
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Developers / Programmers, For writing code, fast typing helps reduce friction. While code often involves symbols and specific formatting (indentation, brackets, etc.), general typing speed and accuracy help with comments, documentation, or writing at the terminal.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Writers / Content Creators, Blog posts, articles, reports: fast typing helps you get thoughts out quickly without getting bogged down by the mechanics of typing.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Students &amp;amp; Multilingual Learners, Those who type in multiple languages, or who are learning a new one, will find value in Typing365’s multilingual support and varied practice texts.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Anyone Wanting to Improve Productivity, Even outside tech, faster &amp;amp; more accurate typing improves overall productivity: less time correcting typos, less fatigue, smoother workflow.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;Typing365 is more than a tool to measure how fast you can hit keys; it’s about evolving your typing practice into a well-informed, habit-forming, and even fun experience. For developers, writers, multilingual users, or anyone who spends time typing, the speed gains, accuracy improvements, and confidence boost can be significant. If you want to stop fighting the keyboard and start letting your ideas flow, it might be worth giving Typing365 a try.&lt;/p&gt;

&lt;p&gt;Try The App Now : &lt;a href="https://typing365.app/" rel="noopener noreferrer"&gt;https://typing365.app/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;or you can Directly get it from store : &lt;a href="https://apps.microsoft.com/detail/9nd9jrkt3f16?referrer=appbadge&amp;amp;mode=direct&amp;amp;hl=en-US&amp;amp;gl=EG" rel="noopener noreferrer"&gt;https://apps.microsoft.com/detail/9nd9jrkt3f16?referrer=appbadge&amp;amp;mode=direct&amp;amp;hl=en-US&amp;amp;gl=EG&lt;/a&gt;&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>discuss</category>
      <category>career</category>
      <category>gamedev</category>
    </item>
    <item>
      <title>Why TypeWin Rebranded to Typing 365</title>
      <dc:creator>Hamza</dc:creator>
      <pubDate>Sun, 14 Sep 2025 15:09:15 +0000</pubDate>
      <link>https://forem.com/1hamzabek/why-typewin-rebranded-to-typing-365-569l</link>
      <guid>https://forem.com/1hamzabek/why-typewin-rebranded-to-typing-365-569l</guid>
      <description>&lt;p&gt;Rebranding is never just about a new logo or domain. It’s a strategic decision that reflects where your product is heading and how you want users to perceive it. Recently, we made the choice to evolve our app’s identity from TypeWin to Typing 365.&lt;/p&gt;




&lt;h2&gt;
  
  
  1. Clarity Over Cleverness
&lt;/h2&gt;

&lt;p&gt;The original name TypeWin was short, catchy, and tech-sounding. But it often created confusion:&lt;/p&gt;

&lt;p&gt;Was it about “typing to win”?&lt;/p&gt;

&lt;p&gt;Was it a Windows-only app?&lt;/p&gt;

&lt;p&gt;Was it a game or a productivity tool?&lt;/p&gt;

&lt;p&gt;In branding, clarity beats cleverness. Typing 365 instantly tells new users:&lt;/p&gt;

&lt;p&gt;It’s about typing.&lt;/p&gt;

&lt;p&gt;It’s about consistency and daily practice (365 days a year).&lt;/p&gt;

&lt;p&gt;👉 Lesson: Your brand name should communicate your core value proposition without requiring explanation.&lt;/p&gt;




&lt;h2&gt;
  
  
  2. From Tool to Habit
&lt;/h2&gt;

&lt;p&gt;When we started, TypeWin was positioned more like a "typing tool." Over time, our vision grew: this wasn't just about practicing occasionally, it was about helping people build a long-term skill and habit.&lt;/p&gt;

&lt;p&gt;The word 365 conveys:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Daily practice.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Commitment.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A year-round challenge.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It aligns the app with lifestyle and self-improvement brands, not just “utilities.”&lt;/p&gt;

&lt;p&gt;👉 Lesson: Rebranding can signal a shift from a product mindset (“we built a tool”) to a lifestyle mindset (“we support your growth every day”).&lt;/p&gt;




&lt;h2&gt;
  
  
  3. Global Scalability
&lt;/h2&gt;

&lt;p&gt;“TypeWin” carried some unintended limitations:&lt;/p&gt;

&lt;p&gt;“Win” sounded Windows-specific, which confused macOS users.&lt;/p&gt;

&lt;p&gt;Some users associated it with gaming (“win a match”), not skill-building.&lt;/p&gt;

&lt;p&gt;For non-English speakers, it didn’t translate well.&lt;/p&gt;

&lt;p&gt;Typing 365 is universal, easy to pronounce, and works across languages. It scales better as we expand globally.&lt;/p&gt;

&lt;p&gt;👉 Lesson: A name that scales internationally avoids roadblocks when entering new markets.&lt;/p&gt;




&lt;h2&gt;
  
  
  4. SEO &amp;amp; Discoverability
&lt;/h2&gt;

&lt;p&gt;In today’s world, discoverability is survival. “TypeWin” struggled against generic search terms like Type Windows or Windows Typing.&lt;/p&gt;

&lt;p&gt;With Typing 365, we immediately gained:&lt;/p&gt;

&lt;p&gt;Better SEO alignment with typing-related queries.&lt;/p&gt;

&lt;p&gt;Stronger memorability (“365” ties it to routine).&lt;/p&gt;

&lt;p&gt;Domain name availability (&lt;a href="https://typing365.app/" rel="noopener noreferrer"&gt;https://typing365.app/&lt;/a&gt;) that fits the brand.&lt;/p&gt;

&lt;p&gt;👉 Lesson: Branding isn’t just about emotion; it’s also about being findable.&lt;/p&gt;




&lt;p&gt;Changing from TypeWin to Typing 365 wasn’t about abandoning our roots. It was about evolving our identity to better match our mission: helping people improve their typing every single day, year-round.&lt;/p&gt;

&lt;p&gt;Check Typing 365 Website for more : &lt;a href="https://typing365.app/" rel="noopener noreferrer"&gt;https://typing365.app/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>programming</category>
      <category>tutorial</category>
      <category>productivity</category>
      <category>learning</category>
    </item>
    <item>
      <title>TypeWin vs MonkeyType: A Developer's Perspective on Typing Test Platforms</title>
      <dc:creator>Hamza</dc:creator>
      <pubDate>Sat, 05 Jul 2025 09:15:05 +0000</pubDate>
      <link>https://forem.com/1hamzabek/typewin-vs-monkeytype-a-developers-perspective-on-typing-test-platforms-36ch</link>
      <guid>https://forem.com/1hamzabek/typewin-vs-monkeytype-a-developers-perspective-on-typing-test-platforms-36ch</guid>
      <description>&lt;p&gt;As developers, our typing skills directly impact our productivity and coding efficiency. While there are numerous typing test platforms available, two have gained significant traction in the developer community: TypeWin and MonkeyType. After extensive testing and analysis, I'll break down the key differences and explain why TypeWin offers a superior experience for serious typists.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Accuracy Revolution: Zero Fault Tolerance
&lt;/h2&gt;

&lt;p&gt;The most significant differentiator between TypeWin and MonkeyType lies in their approach to error handling. TypeWin implements a zero fault tolerance system, meaning every keystroke must be correct to proceed. This approach might seem harsh initially, but it's precisely what makes TypeWin superior for developing real-world typing skills.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Zero Fault Tolerance Matters
&lt;/h2&gt;

&lt;p&gt;When you're coding, debugging, or writing documentation, accuracy isn't optional, it's essential. A single misplaced character can break your entire application. TypeWin's strict accuracy requirements train you to type correctly the first time, building muscle memory that translates directly to more efficient coding sessions.&lt;br&gt;
MonkeyType, while popular, allows you to continue typing even after making mistakes. This creates a false sense of progress and doesn't adequately prepare you for real-world scenarios where precision matters most.&lt;/p&gt;

&lt;h2&gt;
  
  
  Real-World Text vs. Artificial Content
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;TypeWin's Practical Approach&lt;/strong&gt;&lt;br&gt;
TypeWin stands out by offering real texts for practice sessions. Instead of random word combinations or artificially generated content, you'll find yourself typing actual paragraphs from books, articles, and documents. This approach provides several advantages:&lt;/p&gt;

&lt;p&gt;Contextual learning: Real sentences with proper grammar and punctuation&lt;br&gt;
Natural flow: Authentic text patterns that mirror actual writing&lt;br&gt;
Meaningful practice: Content that engages your mind while training your fingers&lt;br&gt;
Diverse vocabulary: Exposure to varied writing styles and terminologies&lt;/p&gt;

&lt;h2&gt;
  
  
  The MonkeyType Limitation
&lt;/h2&gt;

&lt;p&gt;MonkeyType primarily relies on random word lists and basic quote collections. While this might seem sufficient for raw speed training, it fails to prepare you for the complexity of real-world typing scenarios that developers encounter daily.&lt;/p&gt;

&lt;h2&gt;
  
  
  Native Windows Integration vs. Web-Based Limitations
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;TypeWin's Desktop Advantage&lt;/strong&gt;&lt;br&gt;
As a native Windows application, TypeWin leverages the full power of the Windows 11 ecosystem. TypeWin offers a unique experience that seamlessly blends learning, racing, excitement, and self-improvement. Crafted with precision, this native app harnesses the power of Windows 11, featuring a sleek Fluent UI and optimized performance for a buttery-smooth, lightning-fast typing experience.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key benefits include:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Offline functionality: Practice anywhere, anytime without internet dependency&lt;/li&gt;
&lt;li&gt;System integration: Seamless Windows 11 experience with Fluent UI&lt;/li&gt;
&lt;li&gt;Performance optimization: Native code execution for lightning-fast response times&lt;/li&gt;
&lt;li&gt;Resource efficiency: Lower memory footprint compared to browser-based solutions&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  MonkeyType's Web Constraints
&lt;/h2&gt;

&lt;p&gt;While MonkeyType's web-based approach offers convenience, it comes with inherent limitations:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Internet dependency for full functionality&lt;/li&gt;
&lt;li&gt;Browser overhead affecting performance&lt;/li&gt;
&lt;li&gt;Limited system integration capabilities&lt;/li&gt;
&lt;li&gt;Potential for distractions from other browser tabs&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Comprehensive Analytics and Progress Tracking
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;TypeWin's Detailed Insights&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;TypeWin provides comprehensive statistics after every session, offering detailed analysis of your performance including speed, accuracy, and error patterns. This lets you see not just how fast you type, but how you improve session by session. See where you stand globally or within your region. The leaderboard motivates you to keep pushing forward and improving your rank.&lt;br&gt;
The platform includes:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Session-by-session improvement tracking&lt;/li&gt;
&lt;li&gt;Global and regional leaderboards&lt;/li&gt;
&lt;li&gt;Detailed error analysis&lt;/li&gt;
&lt;li&gt;Personalized improvement recommendations
5.Performance certification for professional use&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  MonkeyType's Basic Metrics
&lt;/h2&gt;

&lt;p&gt;While MonkeyType does provide basic statistics, its analysis lacks the depth and actionable insights that TypeWin offers. The focus remains primarily on raw speed metrics rather than comprehensive skill development.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Competitive Edge: Racing and Community
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;TypeWin's Multiplayer Experience&lt;/strong&gt;&lt;br&gt;
Enhance your typing skills and challenge other typists in ranked races in various languages and climb the leaderboard! TypeWin's competitive racing feature adds an engaging social element that motivates continuous improvement.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Features include:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Real-time multiplayer races&lt;/li&gt;
&lt;li&gt;Ranked competitive system&lt;/li&gt;
&lt;li&gt;Multi-language support&lt;/li&gt;
&lt;li&gt;Community challenges and tournaments&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  MonkeyType's Limited Social Features
&lt;/h2&gt;

&lt;p&gt;While MonkeyType has some community features, they lack the comprehensive competitive structure that TypeWin provides.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Developers Should Choose TypeWin
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Professional Development&lt;/strong&gt;&lt;br&gt;
TypeWin's accuracy-focused approach directly translates to better coding practices. When you're trained to type correctly the first time, you'll spend less time debugging typos and more time solving complex problems.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Real-World Preparation&lt;/strong&gt;&lt;br&gt;
The platform's use of authentic texts better prepares you for typing actual code, documentation, and professional communications.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Productivity Enhancement&lt;/strong&gt;&lt;br&gt;
Native Windows integration means TypeWin works seamlessly with your existing workflow, while offline functionality ensures you can practice anywhere.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Measurable Progress&lt;/strong&gt;&lt;br&gt;
Comprehensive analytics help you identify specific areas for improvement, making your practice sessions more targeted and effective.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Professional Credibility&lt;/strong&gt;&lt;br&gt;
TypeWin's certification features can provide tangible proof of your typing skills for professional applications.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;While MonkeyType has gained popularity as a casual typing test platform, TypeWin represents the next evolution in typing skill development. Its combination of zero fault tolerance, real-world text practice, native Windows integration, and comprehensive analytics makes it the superior choice for developers and professionals who demand accuracy and efficiency.&lt;br&gt;
The question isn't whether you can type fast—it's whether you can type accurately and efficiently in real-world scenarios. TypeWin's approach ensures that every practice session builds skills that directly translate to improved productivity in your development work.&lt;br&gt;
For developers serious about improving their typing skills and overall productivity, TypeWin offers a comprehensive, professional-grade solution that goes beyond simple speed testing to deliver genuine skill development.&lt;/p&gt;




&lt;p&gt;Ready to experience the difference? Download TypeWin from the Microsoft Store and discover why accuracy-focused typing training is the future of professional skill development. &lt;a href="https://typewin.app/" rel="noopener noreferrer"&gt;https://typewin.app/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let me know your thoughts about both platforms!&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>programming</category>
      <category>discuss</category>
      <category>learning</category>
    </item>
    <item>
      <title>Ready to Level Up Your Typing? Meet TypeWin! 🚀</title>
      <dc:creator>Hamza</dc:creator>
      <pubDate>Thu, 05 Jun 2025 18:53:20 +0000</pubDate>
      <link>https://forem.com/1hamzabek/ready-to-level-up-your-typing-meet-typewin-1dif</link>
      <guid>https://forem.com/1hamzabek/ready-to-level-up-your-typing-meet-typewin-1dif</guid>
      <description>&lt;p&gt;If you’re someone who spends hours in front of a keyboard, whether coding, writing, or just messaging friends, you might be surprised at how much your typing speed affects your productivity.&lt;/p&gt;

&lt;p&gt;The average person types anywhere between 10 to 50 WPM (words per minute), but imagine how much more you could get done with just a little improvement! 🚀 With focused daily practice, even small gains in speed and accuracy can make a big difference in your workflow.&lt;/p&gt;

&lt;p&gt;📊 Fun Typing Stats&lt;br&gt;
A recent survey by &lt;strong&gt;onlinetyping.org (March 2025)&lt;/strong&gt; surveyed over 56,000 volunteers, the results were fascinating:&lt;/p&gt;

&lt;p&gt;👩‍🎓 Among students:&lt;/p&gt;

&lt;p&gt;35.51% type between 30–40 WPM&lt;/p&gt;

&lt;p&gt;36.89% are below 30 WPM&lt;/p&gt;

&lt;p&gt;Only 1.73% type faster than 60 WPM!&lt;/p&gt;

&lt;p&gt;💻 Among programmers:&lt;/p&gt;

&lt;p&gt;73.42% type between 40–70 WPM&lt;/p&gt;

&lt;p&gt;Only 3.4% are below 30 WPM&lt;/p&gt;

&lt;p&gt;9.35% break the 70+ WPM mark!&lt;/p&gt;

&lt;p&gt;✨ Why We Built TypeWin&lt;br&gt;
We wanted to create a typing experience that doesn’t feel like homework, it should feel like a game, a challenge, and an achievement all in one. That’s exactly what TypeWin is all about.&lt;/p&gt;

&lt;p&gt;Now available on the Microsoft Store, TypeWin brings a fresh, exciting way to practice and improve your typing. Whether you're just getting started or chasing a new personal best, this app is built to make every session rewarding.&lt;/p&gt;



&lt;p&gt;👉 Visit our website: &lt;/p&gt;


&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;div class="c-embed__content"&gt;
        &lt;div class="c-embed__cover"&gt;
          &lt;a href="https://typing365.app/" class="c-link align-middle" rel="noopener noreferrer"&gt;
            &lt;img alt="" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Ftyping365.app%2Fassets%2Fimages%2Fstats.png" height="auto" class="m-0"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="c-embed__body"&gt;
        &lt;h2 class="fs-xl lh-tight"&gt;
          &lt;a href="https://typing365.app/" rel="noopener noreferrer" class="c-link"&gt;
            Typing 365 - Free Typing Speed Test &amp;amp; Practice App for Desktop
          &lt;/a&gt;
        &lt;/h2&gt;
          &lt;p class="truncate-at-3"&gt;
            Free desktop typing test. Practice to boost WPM and accuracy with multilingual tests, live races, and detailed stats. Get it on Microsoft Store.
          &lt;/p&gt;
        &lt;div class="color-secondary fs-s flex items-center"&gt;
            &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Ftyping365.app%2Ffavicon-96x96.png"&gt;
          typing365.app
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;





&lt;p&gt;🚀 Features You’ll Love:&lt;br&gt;
✅ Detailed Typing Stats&lt;br&gt;
Know exactly where you stand, accuracy, WPM, typos, and more.&lt;/p&gt;

&lt;p&gt;✅ Race Mode&lt;br&gt;
Compete against yourself or other typists around the world. It’s addictive! 🔥&lt;/p&gt;

&lt;p&gt;✅ Global Leaderboard&lt;br&gt;
Climb the ranks and represent your country.&lt;/p&gt;

&lt;p&gt;✅ Word Precision Training&lt;br&gt;
Pinpoint tricky words and master them.&lt;/p&gt;

&lt;p&gt;✅ Multi-Language Support&lt;br&gt;
Expand your skills across different languages.&lt;/p&gt;

&lt;p&gt;✅ Offline &amp;amp; Online&lt;br&gt;
No internet? No problem. Your progress syncs to the cloud when you’re back online.&lt;/p&gt;

&lt;p&gt;✅ Modern, Minimal UI&lt;br&gt;
Clean, beautiful, distraction-free, focus on what matters.&lt;/p&gt;

&lt;p&gt;Currently for Windows only, but stay tuned, a web version is in the works to bring this fun experience to even more users. 🌍&lt;/p&gt;

&lt;p&gt;Tried it already? We’d love to hear your feedback, what you liked, what could be better, and how you’re progressing! Drop your thoughts below. 📝👇&lt;/p&gt;

</description>
      <category>microsoft</category>
      <category>beginners</category>
      <category>productivity</category>
      <category>learning</category>
    </item>
    <item>
      <title>Check Out My New CV as a Full Stack .NET Developer!</title>
      <dc:creator>Hamza</dc:creator>
      <pubDate>Fri, 03 Jan 2025 09:17:24 +0000</pubDate>
      <link>https://forem.com/1hamzabek/check-out-my-new-cv-as-a-full-stack-net-developer-67o</link>
      <guid>https://forem.com/1hamzabek/check-out-my-new-cv-as-a-full-stack-net-developer-67o</guid>
      <description>&lt;p&gt;🚀 Excited to Share My New CV! 🚀&lt;/p&gt;

&lt;p&gt;I'm thrilled to present my updated CV, showcasing my journey as a Full Stack .NET Developer. Over the past few years, I have gained hands-on experience in developing scalable web applications using ASP.NET Core, Blazor, SignalR, Entity Framework, and much more. I've worked on exciting projects like 'Noshi', a food ordering app, and 'The-Mart', an e-commerce platform, which allowed me to hone my skills in both backend and frontend development, 'TailsBlaor' a Component Library for Blazor Applications!&lt;/p&gt;

&lt;p&gt;💡 Key Highlights:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Proficient in building responsive UIs with HTML, CSS, and Blazor.
Expertise in ASP.NET Core for backend development and building robust APIs.&lt;/li&gt;
&lt;li&gt;Skilled in real-time communication with SignalR and JWT authentication for secure applications.&lt;/li&gt;
&lt;li&gt;Hands-on experience with SQL Server, Entity Framework, and Azure for cloud deployments.&lt;/li&gt;
&lt;li&gt;Passionate about creating developer content and sharing knowledge through YouTube videos on .NET development.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I’m now looking forward to new opportunities where I can apply my skills, learn from others, and continue growing as a developer. Feel free to check out my CV and reach out if you know of any exciting roles or projects! 💼&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft4b31qkx9t1ntrutga9o.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft4b31qkx9t1ntrutga9o.png" alt="resume" width="795" height="1123"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Links : &lt;/p&gt;

&lt;p&gt;LinkedIn : &lt;a href="https://www.linkedin.com/in/hamza-bek-35276b200/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;&lt;br&gt;
Github : &lt;a href="https://github.com/Hamza-Bek" rel="noopener noreferrer"&gt;Github&lt;/a&gt;&lt;br&gt;
Portfolio : &lt;a href="https://github.com/Hamza-Bek" rel="noopener noreferrer"&gt;Portfolio&lt;/a&gt;&lt;br&gt;
resume : &lt;a href="https://drive.google.com/file/d/1lkixXZJ48cG4k6LKvAPaaAVMmJgA5OFG/view" rel="noopener noreferrer"&gt;pdf | cv&lt;/a&gt;&lt;/p&gt;

</description>
      <category>discuss</category>
      <category>fullstack</category>
      <category>dotnet</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Explaining the Delegates Concept !</title>
      <dc:creator>Hamza</dc:creator>
      <pubDate>Fri, 13 Dec 2024 09:36:14 +0000</pubDate>
      <link>https://forem.com/1hamzabek/explaining-the-delegates-concept--599b</link>
      <guid>https://forem.com/1hamzabek/explaining-the-delegates-concept--599b</guid>
      <description>&lt;p&gt;Delegates are the type that defines a method signature, and can hold a reference to one or more methods with that signature.&lt;br&gt;
They are often described or called as a Type-Safe function pointers because they allow methods to be passed as a parameter, assigned to variable, or invoke dynamically all while ensuring type-safe..🔒&lt;/p&gt;
&lt;h2&gt;
  
  
  What are the Key Points of the Delegates 🗝️ ?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Method Signature : A delegate specifies return type and the parameters of the method it can refer to.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Type-Safe : Delegates ensures that the method they reference has the correct signature.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Multicast : A single delegate can reference multiple methods and invoke them sequentially. This is known as multicast delegate.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Encapsulation : Delegates encapsulates the methods and it's behavior making them useful for defining callback mechanism.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So what is the Syntax of Delegates ?!&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="c1"&gt;// 1. Declare a Delegate..&lt;/span&gt;
&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;delegate&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;MyDelegate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// 2. Create a method matching the Delegate's signature&lt;/span&gt;
&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Program&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

  &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;static&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;DisplayMessage&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;Console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;WriteLine&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;static&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;Main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// 3. Instantiate the delegate&lt;/span&gt;
    &lt;span class="n"&gt;MyDelegate&lt;/span&gt; &lt;span class="n"&gt;del&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;DisplayMessage&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="c1"&gt;// 4. Invoke the delegate&lt;/span&gt;
    &lt;span class="nf"&gt;del&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Hellow, World!"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;Let's talk about the common uses !&lt;br&gt;
There are 3 common uses :&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Event Handling&lt;/li&gt;
&lt;li&gt;Callback mechanism&lt;/li&gt;
&lt;li&gt;LINQ and Functional programming&lt;/li&gt;
&lt;/ol&gt;

&lt;blockquote&gt;
&lt;p&gt;Let's explain them one by one &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;1- Event Handling : Delegate are the foundation of events in C#, They allow subscribing and unsubscribing to events using methods.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;delegate&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;Notify&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;EventExample&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;event&lt;/span&gt; &lt;span class="n"&gt;Notify&lt;/span&gt; &lt;span class="n"&gt;OnNotify&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;TriggerEvent&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;OnNotify&lt;/span&gt;&lt;span class="p"&gt;?.&lt;/span&gt;&lt;span class="nf"&gt;Invoke&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="c1"&gt;// Safely invoke the delegates if it has subscribers &lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;2- Callback mechanism : Passing a method to another method to be executed later.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Calculator&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;PerformOperation&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Action&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;callback&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="p"&gt;+&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nf"&gt;callback&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Program&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;static&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;Main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;Calculator&lt;/span&gt; &lt;span class="n"&gt;calc&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="n"&gt;calc&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;PerformOperation&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;WriteLine&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Pass Console.WriteLine as a Delegate&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;3- LINQ and Functional Programming : Delegates like Func, Action, Predicate are heavily used in LINQ to define custom logic.&lt;/p&gt;




&lt;blockquote&gt;
&lt;p&gt;What are the built-in Delegates ??&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ol&gt;
&lt;li&gt;Action : Represents method with no return value but with parameters.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="n"&gt;Action&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;print&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;WriteLine&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Hello, World!"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Func : Represents a method with a return value and parameter.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="n"&gt;Func&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="k"&gt;add&lt;/span&gt;  &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="p"&gt;+&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;Console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;WriteLine&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="m"&gt;4&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Predicate : Represents a method that return bool and it takes a single parameter.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="n"&gt;Predicate&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;IsEven&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="p"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="p"&gt;%&lt;/span&gt; &lt;span class="m"&gt;2&lt;/span&gt; &lt;span class="p"&gt;==&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;Console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;WriteLIne&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;IsEven&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;4&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Advantages of Delegates &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Flexibility =&amp;gt; Enables dynamic methods invokation&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Loose Coupling =&amp;gt; Promotes code extensibility by allowing methods to be assigned dynamically&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Reuseability =&amp;gt; Encourages creating modular and reuseable code&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That's it for now! Keep coding and stay awesome. Catch you later Nerds!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>beginners</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>ASP.NET Interview Questions: Part 1 - (10 Q &amp; A)</title>
      <dc:creator>Hamza</dc:creator>
      <pubDate>Thu, 12 Dec 2024 22:25:43 +0000</pubDate>
      <link>https://forem.com/1hamzabek/aspnet-interview-questions-part-1-10-q-a-59do</link>
      <guid>https://forem.com/1hamzabek/aspnet-interview-questions-part-1-10-q-a-59do</guid>
      <description>&lt;blockquote&gt;
&lt;h2&gt;
  
  
  1. What is the .NET Framework?
&lt;/h2&gt;
&lt;/blockquote&gt;

&lt;p&gt;The .NET Framework is a comprehensive software development platform developed by Microsoft.&lt;br&gt;
It includes a runtime environment called Common Language Runtime (CLR) and rich set of class libraries. It supports multiple programming languages such as C#, VB.NET, and F# and offers features like memory management, security and exception handling.&lt;/p&gt;

&lt;p&gt;The .NET Framework is primarily used to create applications for Windows, But with the introduction of .NET Core and .NET 5, it can also be used to develop cross-platform applications as well.&lt;/p&gt;



&lt;blockquote&gt;
&lt;h2&gt;
  
  
  2. What is Common Language Runtime (CLR)?
&lt;/h2&gt;
&lt;/blockquote&gt;

&lt;p&gt;The Common Language Runtime (CLR) is the execution environment provided by the .NET Framework. it manages the execution of .NET applications, providing services like memory management, Code verification, Security, garbage collection, and exception handling.&lt;/p&gt;

&lt;p&gt;One of the key features of the CLR is the Just-In-Time (JIT) compiler.&lt;br&gt;
When a .NET application is executed, The CLR uses the JIT compiler to convert the intermediate language (IL) code into a native machine code. This process happens during the execution, ensuring platform-specific optimization.&lt;/p&gt;



&lt;blockquote&gt;
&lt;h2&gt;
  
  
  3. Explain the difference between Value types and reference types in .NET ?
&lt;/h2&gt;
&lt;/blockquote&gt;

&lt;p&gt;In .NET data types are split up into 2 types : &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Value Types &lt;/li&gt;
&lt;li&gt;Reference Types&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The primary difference between them lies on how they store their data and how they handle it in memory.&lt;/p&gt;

&lt;p&gt;-&amp;gt; &lt;code&gt;Value Types&lt;/code&gt; directly contain their data and are stored on the stack.&lt;br&gt;
They include primitive types such as :(int/bool/float/double/char/decimal/enum). &lt;br&gt;
When a value is assigned to a new variable a copy of the value is made, Therefore, changes made to one variable do not affect the other&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="m"&gt;10&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;y&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="m"&gt;20&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="c1"&gt;// Here x is not effected, x still 10 and y equal 20.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;-&amp;gt; &lt;code&gt;Reference Types&lt;/code&gt; on the other hand, store a reference to the actual data, which is stored on the heap. They include types such as :&lt;br&gt;
(class/interface/delegate/string/array).&lt;br&gt;
When a reference type is assigned to a new variable, the interface is copied, not the actual data. Therefore changes made to one variable will affect the other, as they both point to the same data.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Person&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="n"&gt;Name&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="k"&gt;get&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;set&lt;/span&gt;&lt;span class="p"&gt;;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="n"&gt;Person&lt;/span&gt; &lt;span class="n"&gt;person1&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="n"&gt;Person&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;Name&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"Resh"&lt;/span&gt;&lt;span class="p"&gt;};&lt;/span&gt;
&lt;span class="n"&gt;Person&lt;/span&gt; &lt;span class="n"&gt;person2&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;person1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;person2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Name&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"Mezz"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="n"&gt;Console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;WriteLine&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;person1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Name&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// output : Mezz;&lt;/span&gt;
&lt;span class="n"&gt;Console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;WriteLine&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;person2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Name&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// output : Mezz;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Understanding the difference between value types and reference types is crucual for efficient, Memory management and performance optimization in .NET Applications.&lt;/p&gt;




&lt;h2&gt;
  
  
  &amp;gt; 4. What is the purpose of the System.IO namespace in .NET ?
&lt;/h2&gt;

&lt;p&gt;The System.IO namespace in .NET is a fundamental part of the framework that provides classes and methods for handling input/output (I/O) operations.&lt;br&gt;
These operations include reading from and writing to files, data streams, and communication with devices like hard drives and network connections.&lt;/p&gt;

&lt;p&gt;The System.IO namespace includes a variety of classes that allows developers to interact with the file system and handle data streams efficiently. Some of the key classes include :&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;File&lt;/strong&gt; : Provides static methods for creating, opening, deleting, and moving files.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Directory&lt;/strong&gt; : Provides static methods for creating, moving and enumerating through directories and subdirectories &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;FileStream&lt;/strong&gt; : Provides a stream for a file, supporting both synchronous  and asynchronous read and write operations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;StreamReader and StreamWriter&lt;/strong&gt; : These classes are for reading from and writing to character streams.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;BinaryReader and BinaryWriter&lt;/strong&gt; : These classes are for reading from and writing to binary streams.&lt;/p&gt;


&lt;h2&gt;
  
  
  &amp;gt; 5. How does the concept of attributes facilitate metadata in .NET?
&lt;/h2&gt;

&lt;p&gt;Attributes in .NET are powerful constructs that allow developers to add metadata---additional descriptive information---to various elements in the code, such as classes, methods, properties and more...&lt;br&gt;
This metadata can be accessed at runtim using reflection, allowing for dynamic and flexible programming.&lt;/p&gt;

&lt;p&gt;Attributes have square brackets [] and are placed above the code elements they are related to. They can be utilised to control bahavior, provide additional information or introduce extra functionality.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Serializable&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;ExampleClass&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;//Some code...&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;in the example above, the [Serializable] attribute is used to indicate that ExampleClass class can be serialized, a capability often curcial for storage or network transmission.&lt;/p&gt;

&lt;p&gt;in addition to using predefined attributes such as Serialization, compilation, marshalling, etc... &lt;br&gt;
.NET allows creating custom attributes to meet specific needs. This makes attributes a versatile and integral part of .NET, promoting declarative programming and code readability.&lt;/p&gt;
&lt;h2&gt;
  
  
  &amp;gt; 6. What is the difference between an exe and dll file in .NET?
&lt;/h2&gt;

&lt;p&gt;An exe (executable) file contains an application's entry point and is intended to be executed directly. It represents a standalone program&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Program&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
 &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;static&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;Main&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt; &lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
   &lt;span class="c1"&gt;//This is the entry level...&lt;/span&gt;
 &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On the other hand, a dll (dynamic-linl library) file contains ruseable code that can be referenced and use by mulitple applications. &lt;br&gt;
It allows for code sharing and modular development.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Library&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;SharedMethod&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;//This method can be used across different applications.&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;At runtime, The Common Language Runtime (CLR) loads and executes the exe's code and loads the corresponding dll into memory as needed when a class to  a dll's functionality is made.&lt;/p&gt;




&lt;h2&gt;
  
  
  &amp;gt; 7. Explain the concept of Serialization and Deserialization in .NET ?
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;Serialization&lt;/code&gt; is the process of converting an object into a stream of bytes to store or transmit it.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Deserialization&lt;/code&gt; is the reverse process of reconstructing the object from the serialized bytes.&lt;/p&gt;

&lt;p&gt;These mechanisms allow objects to be persisted, transferred over a network, or shared between different parts of an application.&lt;/p&gt;




&lt;h2&gt;
  
  
  &amp;gt; 8. What are the different types of exceptions in .NET and how are they handled ?
&lt;/h2&gt;

&lt;p&gt;There are various types of exceptions in .NET, all of which derive from the base System.Exception class. Some commonly used exceptions include System.ApplicationException, System.NullReferenceException, System.IndexOutOfRangeException, System.DivideByZeroException and more....&lt;/p&gt;

&lt;p&gt;In .NET exceptions are handled by using try-catch-finally blocks:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Try&lt;/strong&gt; : The try block contains the code segment that may throw an exception.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;catch&lt;/strong&gt; : The catch block is used to capture and handle exceptions if they occur. You can have multiple catch block for a single Try block to handle different exceptions types separately.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;finally&lt;/strong&gt; : The finally block is optional and contains the code segment that should be executed irrespective of an error occuring. This generally conatins cleanup code...&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;try&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt; &lt;span class="n"&gt;arr&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="m"&gt;3&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="n"&gt;Console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;WriteLine&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;arr&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="m"&gt;3&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt; &lt;span class="c1"&gt;//This will throw an IndexOutOfRangeException..&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;catch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;IndexOutOfRangeException&lt;/span&gt; &lt;span class="n"&gt;ex&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
&lt;span class="n"&gt;Console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;WriteLine&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Exception : {ex.Message}"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;finally&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="n"&gt;Console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;WriteLine&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"This line is always executed wether the exception is thrown or not"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  &amp;gt; 9. What is the role of globalization and localization in .NET ?
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;Globalization&lt;/code&gt;refers to designing and developing applications that can adapt to different cultures, Language, and regions.&lt;br&gt;
&lt;code&gt;Localization&lt;/code&gt; is the process of customizing an application to a specific culture or locale.&lt;/p&gt;

&lt;p&gt;In .NET, globalization and localization are supported through features like resource files, satellite, and the CultureInfo class, allowing applications to display localized and handle culture differenceses.&lt;/p&gt;




&lt;h2&gt;
  
  
  &amp;gt; 10. What is the difference between IActionResult and ActionResult in .NET ?
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;IActionResult&lt;/code&gt; is an interface that represents the result of an action method.&lt;br&gt;
It provides flexibility as you can return any object that implements this interface.&lt;br&gt;
&lt;code&gt;ActionResult&lt;/code&gt; is a concrete implementation of IActionResult. It is a base class for results such as ViewResult, JsonResult, RedirectResult, etc... and provides additional type-safety and functionality.&lt;/p&gt;




&lt;p&gt;That's it for now! Keep coding and stay awesome. Catch you later Nerds 👋&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>tutorial</category>
      <category>interview</category>
    </item>
    <item>
      <title>An Overview of the Main Class Types in OOP</title>
      <dc:creator>Hamza</dc:creator>
      <pubDate>Tue, 10 Dec 2024 11:09:18 +0000</pubDate>
      <link>https://forem.com/1hamzabek/an-overview-of-the-main-class-types-in-oop-26hk</link>
      <guid>https://forem.com/1hamzabek/an-overview-of-the-main-class-types-in-oop-26hk</guid>
      <description>&lt;p&gt;So in programming, Class types refers to the classification of classes based on their purpose, behavior, or implementation style.&lt;/p&gt;

&lt;p&gt;Classes are blueprints for creating objects and can be organized into different types based on their use in &lt;strong&gt;Object-Oriented programming (OOP)&lt;/strong&gt;&lt;/p&gt;




&lt;blockquote&gt;
&lt;p&gt;Here's the main types of classes :&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  1.Concrete Class :
&lt;/h2&gt;

&lt;p&gt;This is the most common type of classes used to create objects directly. Not all methods and properties are required; a concrete class can define methods and properties. It may also leave some optional&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Car&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="n"&gt;Make&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;Drive&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;//Some code..&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  2.Abstract Class :
&lt;/h2&gt;

&lt;p&gt;This class type can't be instantiated directly, Designed to be a base class for other classes, May include Abstract method(without implementation), Derived class must implement the abstract method.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;abstract&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Shape&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
   &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;abstract&lt;/span&gt; &lt;span class="kt"&gt;double&lt;/span&gt; &lt;span class="nf"&gt;CalculateArea&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
   &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;Display&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;Console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;WriteLine&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Shape.."&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  3.Interface Class :
&lt;/h2&gt;

&lt;p&gt;An interface defines a contract that implementing classes must follow. It specifies what methods or properties must be implemented but does not enforce how they should be implemented. In traditional interfaces, all members are abstract (no implementation). However, modern programming languages like C# allow interfaces to include default implementations for some members.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;interface&lt;/span&gt; &lt;span class="nc"&gt;IDriveable&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;Drive&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  4.Static Class:
&lt;/h2&gt;

&lt;p&gt;This type can't be instantiated, Contains only static members (methods, properties) which belong to the class itself rather than any object.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;static&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;MathUtilites&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;static&lt;/span&gt; &lt;span class="kt"&gt;double&lt;/span&gt; &lt;span class="nf"&gt;Add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;double&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;double&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="p"&gt;+&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  5.Sealed Class :
&lt;/h2&gt;

&lt;p&gt;This class can not be inherited by other classes. used to prevent further derivation.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;sealed&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Singleton&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="n"&gt;ShowMessages&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;//Some code..&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  6.Partial Class :
&lt;/h2&gt;

&lt;p&gt;Split across multiple files. All parts are combined into a single class during compilation. Useful for large classes or auto-generated code.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="c1"&gt;//File 1&lt;/span&gt;
&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;partial&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Customer&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;printDetails&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;//Some code..&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;//File 2&lt;/span&gt;
&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;partial&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Customer&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;UpdateDetails&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;//Some code..&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  7. Generic Class :
&lt;/h2&gt;

&lt;p&gt;This type defined with type parameters allowing code to be more reuseable  and type safe.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Box&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;T&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="n"&gt;T&lt;/span&gt; &lt;span class="n"&gt;content&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="k"&gt;get&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;set&lt;/span&gt;&lt;span class="p"&gt;;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  8.Nested Class :
&lt;/h2&gt;

&lt;p&gt;Defined within a class, and it can access the private members of the outer class.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;OuterClass&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;private&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="n"&gt;secret&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"Outer class secret"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;NestedClass&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;RevealSecret&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;OuterClass&lt;/span&gt; &lt;span class="n"&gt;outer&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="n"&gt;Console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;WriteLine&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;outer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;secret&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  9.Record Class :
&lt;/h2&gt;

&lt;p&gt;Immutable reference type. primarily used to store data. Provides built-in functionality for equality checks and copying.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;record&lt;/span&gt; &lt;span class="nc"&gt;person&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="n"&gt;Email&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;age&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's for today, Catch you up later.&lt;/p&gt;

&lt;p&gt;Keep Learning Nerds!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>beginners</category>
      <category>tutorial</category>
      <category>programming</category>
    </item>
    <item>
      <title>Explaining SOLID Principle !</title>
      <dc:creator>Hamza</dc:creator>
      <pubDate>Thu, 05 Dec 2024 08:59:53 +0000</pubDate>
      <link>https://forem.com/1hamzabek/explaining-solid-principle--19m9</link>
      <guid>https://forem.com/1hamzabek/explaining-solid-principle--19m9</guid>
      <description>&lt;p&gt;The Solid Principle 🗂️ is a set of five design principles in OOP that helps developers to create more maintainable, Flexible and Scalable software.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is main focus of these principles?&lt;/strong&gt; These principles aim to improve software design and encourage best practices.&lt;/p&gt;

&lt;p&gt;So SOLID Principles is actually a 5 principles combined within "Solid".&lt;br&gt;
Let's dive into them...!&lt;/p&gt;

&lt;p&gt;1- S =&amp;gt; Single Responsibility Principle (&lt;code&gt;SRP&lt;/code&gt;)&lt;br&gt;
2- O =&amp;gt; Open/Closed Principel (&lt;code&gt;OCP&lt;/code&gt;)&lt;br&gt;
3- L =&amp;gt; Liskov Substitution Principle (&lt;code&gt;LSP&lt;/code&gt;)&lt;br&gt;
4- I =&amp;gt; Interface Segregation Principle (&lt;code&gt;ISP&lt;/code&gt;)&lt;br&gt;
5- D =&amp;gt; Dependency Inversion Principle (&lt;code&gt;DIP&lt;/code&gt;)&lt;/p&gt;

&lt;p&gt;These are the 5 Principles, Now it's time to through each one..&lt;/p&gt;


&lt;h2&gt;
  
  
  1.Single Responsibility Principle
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Definition : A Class should have one reason to change, Meaning it should have only one functionality.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Benefit : Reduces complexity and improve code maintainability by ensuring each class handles a single function.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;If you don't feel it makes sense, Check the next example, otherwise just pass it&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;


&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="c1"&gt;//Violate SRP&lt;/span&gt;
&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;UserManager&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

   &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;AddUser&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="n"&gt;Email&lt;/span&gt; &lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;Id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
     &lt;span class="c1"&gt;//Some code....&lt;/span&gt;
   &lt;span class="p"&gt;}&lt;/span&gt;

   &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;SendEmailToUser&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;Id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
     &lt;span class="c1"&gt;//Some code....&lt;/span&gt;
   &lt;span class="p"&gt;}&lt;/span&gt;

   &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;SendReportToUser&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="n"&gt;Email&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
     &lt;span class="c1"&gt;//Some code....&lt;/span&gt;
   &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Q1 : What do you think we should do to follow the SR (Single Responsibility) Principle ?.....&lt;/p&gt;

&lt;p&gt;The last example use one class &lt;code&gt;UserManager&lt;/code&gt; to do more than one function (AddUser , SendEmailToUser , SendReportToUser). In order to follow the SRP, Each class should preform only one function .&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="c1"&gt;//Following the SRP&lt;/span&gt;

&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;UserManager&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;AddUser&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="n"&gt;Email&lt;/span&gt; &lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;Id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;//Some code..&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;EmailService&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;SendEmail&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;Id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;//Some code..&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;ReportService&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;SendReport&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="n"&gt;Email&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;//Some code..&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  2.Open/Closed Principle (OCP)
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Definition : Software entities (Classes, Modules, Functions) should be able to extend, but not able to modify. So open for extension and closed for modification &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Benefit : New functions can be added without alerting existing code, reducing the risk of introducing bugs..&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let's take an example of OCP violation&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;
&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;PaymentService&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

  &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;PaymentProccess&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="n"&gt;paymentType&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

     &lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;paymentType&lt;/span&gt; &lt;span class="p"&gt;==&lt;/span&gt; &lt;span class="s"&gt;"PayPal"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
         &lt;span class="c1"&gt;//Some code....&lt;/span&gt;
     &lt;span class="p"&gt;}&lt;/span&gt;  

     &lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;paymentType&lt;/span&gt; &lt;span class="p"&gt;==&lt;/span&gt; &lt;span class="s"&gt;"CreditCard"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
         &lt;span class="c1"&gt;//Some code....&lt;/span&gt;
     &lt;span class="p"&gt;}&lt;/span&gt;  

     &lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;paymentType&lt;/span&gt; &lt;span class="p"&gt;==&lt;/span&gt; &lt;span class="s"&gt;"BitCoin"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
         &lt;span class="c1"&gt;//Some code....&lt;/span&gt;
     &lt;span class="p"&gt;}&lt;/span&gt;  
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Q2 : What would you think the last example is breaking the OCP ?!&lt;/p&gt;

&lt;p&gt;Let's now refactoring to OCP....&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="c1"&gt;// #1: Create a interface&lt;/span&gt;
&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;interface&lt;/span&gt; &lt;span class="nc"&gt;IPaymentService&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;process&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// #2: Implement Payment Classes&lt;/span&gt;
&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;PayPalPayment&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;IPaymentService&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;Process&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;//Some code.. &lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;ICreditCardPayment&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;IPaymentService&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;Process&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;//Some code..&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this way, we made our code following the OCP, How that ?!&lt;br&gt;
Before factoring to OCP.. We must add a if statement to check the paymentType, After refactoring to OCP, we can easily just add a class for processing a paymentType without changing the base code..!&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;BitcoinPayment&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;IPaymentService&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; 

   &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;Process&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
     &lt;span class="c1"&gt;//Some code..&lt;/span&gt;
   &lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="p"&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  3.Liskov Subsitution Principle (LSP)
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Definition: Objects of the superclass should be replaceable with objects of subclass without affecting the correctness of the program. In other words, Let's say you have a superclass called [A] and subclass called [B], you should be able to use [B] wherever the [A] Class is used..&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Benefit: Maintainability.. Base code would not change or effect when you add external code or function.&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;
&lt;span class="c1"&gt;//Superclass&lt;/span&gt;
&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Bird&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

   &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;virtual&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Fly&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="n"&gt;Console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;WriteLine&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"This bird is flying"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
   &lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;//Subclass #1&lt;/span&gt;
&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;sparrow&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Bird&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

  &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;override&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;Fly&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;Console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;WriteLine&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"The sparrow is flying"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;//Subclass #2&lt;/span&gt;
&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Penguin&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Bird&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
   &lt;span class="c1"&gt;//Surely penguins can't fly.. So we are passing incorrect info..&lt;/span&gt;
   &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;override&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="n"&gt;Fly&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nf"&gt;NotImplementedException&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Penguins can't fly!"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
   &lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This violate the LSP... because if we use the &lt;code&gt;penguin&lt;/code&gt; class wherever the &lt;code&gt;Bird&lt;/code&gt; object is expected.. The program will behave unexpectedly, because calling a &lt;code&gt;Fly&lt;/code&gt; on a &lt;code&gt;penguin&lt;/code&gt; class will throw an exception... penguins can't fly buddy 😂!!&lt;/p&gt;

&lt;p&gt;Q3: Can you try to figure out how i'm going to achieve LSP??&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;abstract&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Bird&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;abstract&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;Display&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;//Create interface for flying behavior..&lt;/span&gt;
&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;interface&lt;/span&gt; &lt;span class="nc"&gt;IFlyable&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;Fly&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; 

&lt;span class="c1"&gt;//Now we cant implement the subclass correctly...&lt;/span&gt;
&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;sparrow&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Bird&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;IFlyable&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

  &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;override&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;Display&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;Console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;WriteLine&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"This is a sparrow!!"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

 &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;Fly&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;Console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;WriteLine&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"This sparrow is flying"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;penguin&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Bird&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

  &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;override&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;Display&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;Console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;WriteLine&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"This is a pneguin!"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  4. Interface Segregation Principle (ISP)
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Defintion : The Interface Segregation Principle states that a class should not be forced to implement interfaces it does not use. Instead, larger interfaces should be divided into smaller, more specific ones so that implementing classes only need to be concerned with the methods relevant to them&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Benefit: Prevents classes from implementing irrelevant methods. Makes code more modular and easier to understand. Supports the Single Responsibility Principle (SRP) by focusing interfaces on specific behaviors.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Violating the principle :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;interface&lt;/span&gt; &lt;span class="nc"&gt;IAnimal&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;Eat&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;Fly&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;Swim&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Dog&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;IAnimal&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;Eat&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;Console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;WriteLine&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Dog is eating."&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;Fly&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nf"&gt;NotImplementedException&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="c1"&gt;// Not relevant for a dog&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;Swim&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;Console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;WriteLine&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Dog is swimming."&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The last example violates the Interface Segregation Principle (ISP) because it forces the Dog class to implement methods (Fly) that are irrelevant or unnecessary for its behavior. This creates several problems.&lt;/p&gt;

&lt;p&gt;let's try to refactoring to the principle:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;interface&lt;/span&gt; &lt;span class="nc"&gt;IEater&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;Eat&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;interface&lt;/span&gt; &lt;span class="nc"&gt;ISwimmer&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;Swim&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Dog&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;IEater&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;ISwimmer&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;Eat&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;Console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;WriteLine&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Dog is eating."&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;Swim&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;Console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;WriteLine&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Dog is swimming."&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;by splitting the IAnimal interface into smaller, behavior-specific interfaces like IEater, IFlyer, and ISwimmer, each class can implement only the interfaces relevant to its behavior. This avoids the issues mentioned above and adheres to the ISP, making the codebase cleaner, more maintainable, and more flexible&lt;/p&gt;




&lt;h2&gt;
  
  
  5.Dependency Inversion Principle (DIP)
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Definition : The High-Level modules should not depends on the Low-Level Modules..Both should depend on abstract (Interface/Abstract Classes)..&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Benifit : Reduce tight coupling between components, making the system more flexible and more easier to refractor or reset..&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That's it for now! Keep coding and stay awesome. Catch you later!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>beginners</category>
      <category>tutorial</category>
      <category>programming</category>
    </item>
    <item>
      <title>What is OOP ?!</title>
      <dc:creator>Hamza</dc:creator>
      <pubDate>Mon, 02 Dec 2024 16:58:03 +0000</pubDate>
      <link>https://forem.com/1hamzabek/what-is-oop--4dnc</link>
      <guid>https://forem.com/1hamzabek/what-is-oop--4dnc</guid>
      <description>&lt;p&gt;OOP stands for &lt;strong&gt;O&lt;/strong&gt;bject-&lt;strong&gt;O&lt;/strong&gt;riented &lt;strong&gt;P&lt;/strong&gt;rogramming.&lt;/p&gt;




&lt;blockquote&gt;
&lt;p&gt;OOP is a programming model in computer science that relies on the concept of Classes and Objects.&lt;br&gt;
It is used to structure a software program into a simple and reusable pieces of code, Called Blueprint (Usually called classes) which are used to create individual instances of objects.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  CLASS's COMPONENTS:
&lt;/h2&gt;

&lt;p&gt;1.Properties &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Properties represent the attributes or data of an object. They define what an object 'Has'.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Properties typically include getters and setters methods to read and write values.&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Car&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
   &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="n"&gt;Make&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="k"&gt;get&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;set&lt;/span&gt;&lt;span class="p"&gt;;}&lt;/span&gt;
   &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="n"&gt;Model&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="k"&gt;get&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;set&lt;/span&gt;&lt;span class="p"&gt;;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;2.Fields&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Fields are variables declared within a class, They represent the internal data or state of an object. Fields usually have private access modifiers and are accessed through properties or methods.
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Car&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;private&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="n"&gt;_engineType&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;//Field&lt;/span&gt;

  &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="n"&gt;EngineType&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;get&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;_engineType&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;set&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;_engineType&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;value&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
 &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;3.Methods (Functions) &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Methods define the actions or behaviors that an object can perform, They represent what an object can do.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Methods in a class can be instance methods (requiring an object instance to invoke) or static methods (which can be called without an object instance).&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Car&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;StartEngine&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
     &lt;span class="n"&gt;Console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;WriteLine&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Engine started"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;StopEngine&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
     &lt;span class="n"&gt;Console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;WriteLine&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Engine stopped"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;4.Constructors&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A constructor is a special method used to initialize new objects. It is called when an object is created from the class. It can set initial values for the object's properties or fields.
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Car&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="n"&gt;Make&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="k"&gt;get&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;set&lt;/span&gt;&lt;span class="p"&gt;;}&lt;/span&gt;
  &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="n"&gt;Model&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="k"&gt;get&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;set&lt;/span&gt;&lt;span class="p"&gt;;}&lt;/span&gt;

  &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="nf"&gt;Car&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="n"&gt;make&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;Make&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;make&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="n"&gt;Model&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;5.Static Members 👨‍👩‍👦‍👦&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Static Members (both fields and methods) belong to the class itself rather than any specific object instance. You can access static members using class name, not enough through an object instance.
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Car&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;static&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;TotalCarsCreated&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="k"&gt;get&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;set&lt;/span&gt;&lt;span class="p"&gt;;}&lt;/span&gt;

  &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="nf"&gt;Car&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
     &lt;span class="n"&gt;TotalCarsCreated&lt;/span&gt;&lt;span class="p"&gt;++;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;static&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;DisplayTotalCars&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;Console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Writeline&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;$"Total cars created : &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;TotalCarsCreated&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Example usage :&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="n"&gt;Car&lt;/span&gt; &lt;span class="n"&gt;myCar&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="n"&gt;Car&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;DisplayTotalCars&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="c1"&gt;//output : Total cars created : 1 &lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;6.Destructors &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A destructor is a special method used to clean up resources when an object is destroyed. This is less common in managed languages like C#, as garbage collection automatically handles memory management. However, destructors are still useful for releasing unmanaged resources. &lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Access Modifiers 🔒&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;Classes can define access modifiers that control the visibility and accessibility of their members (properties, field, methods, etc...).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;-&amp;gt; Public : Accessible from anywhere&lt;br&gt;
-&amp;gt; Private : Accessible only from the class itself&lt;br&gt;
-&amp;gt; Protected : Accessible withing the class and derived classes&lt;br&gt;
-&amp;gt; Internal : Accessible within the same assembly&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;private&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Car&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;//your code&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Car&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;//your code&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;protected&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Car&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;//your code&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;internal&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Car&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;//your code&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  CLASS as an ABSTRACT BLUEPRINT:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;A Class acts as a Blueprint or Template for creating objects. It defines the properties(fields), Behaviours(methods), and the structure that its objects will have.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A Clss itself does not create an object directly; it is a definition of how the object will look and behave.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  CONCRETE OBJECTS :
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;When you instantiate a class (using &lt;code&gt;new&lt;/code&gt; keyword in C#), you create an object or an instance of that class.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;These object are referred to as concrete objects because they are actual instances created from the class blueprint&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Car&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
   &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="n"&gt;Make&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="k"&gt;get&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;set&lt;/span&gt;&lt;span class="p"&gt;;}&lt;/span&gt;
   &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="n"&gt;Model&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="k"&gt;get&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;set&lt;/span&gt;&lt;span class="p"&gt;;}&lt;/span&gt;

   &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;StartEngine&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
   &lt;span class="p"&gt;{&lt;/span&gt;
     &lt;span class="n"&gt;Console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;WriteLine&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Engine Started"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
   &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;//Creating concrete objects from the class:&lt;/span&gt;
&lt;span class="n"&gt;Car&lt;/span&gt; &lt;span class="n"&gt;car1&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="n"&gt;Car&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;Make&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"BMW"&lt;/span&gt; &lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Model&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"x6"&lt;/span&gt;&lt;span class="p"&gt;};&lt;/span&gt;
&lt;span class="n"&gt;Car&lt;/span&gt; &lt;span class="n"&gt;car2&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="n"&gt;Car&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;Make&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"Mercedes"&lt;/span&gt; &lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Model&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"G63"&lt;/span&gt;&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="n"&gt;car1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;StartEngine&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="c1"&gt;//output : Engine Stated&lt;/span&gt;
&lt;span class="n"&gt;car2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;StartEngine&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="c1"&gt;//output : Engine Stated&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The &lt;code&gt;Car&lt;/code&gt; class is the &lt;strong&gt;abstract blueprint&lt;/strong&gt; (note that it doesn't represent actual car yet)&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;Car1&lt;/code&gt; and &lt;code&gt;Car2&lt;/code&gt; are concrete objects created from the &lt;code&gt;Car&lt;/code&gt; Class&lt;/p&gt;


&lt;h2&gt;
  
  
  THE FOUR PILLARS OF OOP :
&lt;/h2&gt;

&lt;p&gt;1.Encapsulation&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Definition&lt;/strong&gt; Bundling data(fields) and methods that operate on that data into a single unit(class) and restricting access to some of the object's components.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Purpose&lt;/strong&gt; To hide the internal state and behavior of an object and expose only what is necessary.&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;BankAccount&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;private&lt;/span&gt; &lt;span class="kt"&gt;double&lt;/span&gt; &lt;span class="n"&gt;balance&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;Deposit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;double&lt;/span&gt; &lt;span class="n"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;amount&lt;/span&gt; &lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;balance&lt;/span&gt; &lt;span class="p"&gt;+=&lt;/span&gt; &lt;span class="n"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;double&lt;/span&gt; &lt;span class="nf"&gt;Getbalance&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;balance&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;Key Concept : Protects the object's integrity by preventing unauthorized  access or modifications.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;2.Inheritance &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;*&lt;em&gt;Definition *&lt;/em&gt; Allows one class (child or derived class) to inherit the properties and behaviors (methods) of another class (parent or base class)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;** *&lt;em&gt;Purpose *&lt;/em&gt; Promotes code reuse and establishes a hierarchical relationship between classes.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Animal&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;Eat&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;Console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;WriteLine&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Eating...);
&lt;/span&gt;  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Dog&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Animal&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;Bark&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;Console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;WriteLine&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Barking"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;Key Concept : Enables the creatio of specialized classes based on existing ones.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;3.Polymorphism &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Definition&lt;/strong&gt; Allows objects of different classes to be treated as objects of a common base class. The same interface or method can behave differently based on the object invoking it.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There are two types :&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Compile-time Polymorphism (Method Overloading) : Multiple methods with the same name but different parameters.
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Calculator&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

  &lt;span class="c1"&gt;//This takes 2 integers..&lt;/span&gt;
  &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="nf"&gt;Add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="p"&gt;+&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

 &lt;span class="c1"&gt;//This takes 3 integers..&lt;/span&gt;
  &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="nf"&gt;Add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt; &lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="p"&gt;+&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt; &lt;span class="p"&gt;+&lt;/span&gt; &lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

 &lt;span class="c1"&gt;//This takes 4 integers..&lt;/span&gt;
  &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="nf"&gt;Add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt; &lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;c&lt;/span&gt; &lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="p"&gt;+&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt; &lt;span class="p"&gt;+&lt;/span&gt; &lt;span class="n"&gt;c&lt;/span&gt; &lt;span class="p"&gt;+&lt;/span&gt; &lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// Let's make instance of the Calculator class..&lt;/span&gt;
&lt;span class="n"&gt;Calculator&lt;/span&gt; &lt;span class="n"&gt;myCal&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="n"&gt;Console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;WriteLine&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;myCalc&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="m"&gt;3&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt; &lt;span class="c1"&gt;//output : 5&lt;/span&gt;
&lt;span class="n"&gt;Console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;WriteLine&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;myCalc&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="m"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="m"&gt;5&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt; &lt;span class="c1"&gt;//output : 10&lt;/span&gt;
&lt;span class="n"&gt;Console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;WriteLine&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;myCalc&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="m"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="m"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt; &lt;span class="c1"&gt;//output : 16&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;So here it cames the Magic of the Polymorphism (Method Overloading), you just call the method can insert a values (must be 2 or 3 or 4 numbers as we declared before)...&lt;/p&gt;

&lt;p&gt;2.Run-time Polymorphism (Method Overriding) : Methods in a derived class override the methods of a base class.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Animal&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;virtual&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;MakeSound&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;Console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;WriteLine&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Bla bla bla..."&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Dog&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;override&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;MakeSound&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
   &lt;span class="n"&gt;Console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;WriteLine&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Bark"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="n"&gt;Animal&lt;/span&gt; &lt;span class="n"&gt;myDog&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="n"&gt;myDog&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;MakeSound&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="c1"&gt;//output : Bark&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Notice keyword &lt;code&gt;Virtual&lt;/code&gt; in the base class, It is added so other child classes can override it (make it possible to be overridden).&lt;/p&gt;

&lt;p&gt;4.Abstraction&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Definition&lt;/strong&gt; Simplifying complex reality by modeling classes appropriate to the problem and providing a clear separation between what an object does and how it achieves it.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;*&lt;em&gt;Purpose *&lt;/em&gt; To hide complex implementation details and show only the relevant parts.&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;abstract&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Shape&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;abstract&lt;/span&gt; &lt;span class="kt"&gt;double&lt;/span&gt; &lt;span class="nf"&gt;CalculateArea&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Circle&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Shape&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;double&lt;/span&gt; &lt;span class="n"&gt;Radius&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="k"&gt;get&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;set&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;override&lt;/span&gt; &lt;span class="kt"&gt;double&lt;/span&gt; &lt;span class="nf"&gt;CalculateArea&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;PI&lt;/span&gt; &lt;span class="p"&gt;*&lt;/span&gt; &lt;span class="n"&gt;Radius&lt;/span&gt; &lt;span class="p"&gt;*&lt;/span&gt; &lt;span class="n"&gt;Radius&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;So These principles work together to provide a robust framework for designing flexible, modular, and maintainable software.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Encapsulation protects an object's state.&lt;/li&gt;
&lt;li&gt;Inheritance promotes code reuse&lt;/li&gt;
&lt;li&gt;Polymorphism provides flexibility through dynamic behavior&lt;/li&gt;
&lt;li&gt;Abstraction hides complexity and provides clean interface.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;To explore another approach to Object-Oriented Programming with a different explanation and style, check out my friend's insightful article &lt;/p&gt;
&lt;div class="ltag__link"&gt;
  &lt;a href="/rasheedmozaffar" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F892850%2F7e0bbcfa-e18c-436b-9e63-242b1da7dd0a.jpeg" alt="rasheedmozaffar"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="https://dev.to/rasheedmozaffar/introducing-object-oriented-programming-in-c-5b1o" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;Introducing Object-Oriented-Programming&lt;/h2&gt;
      &lt;h3&gt;Rasheed K Mozaffar ・ Feb 9 '23&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#dotnet&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#csharp&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#beginners&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#programming&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;



&lt;p&gt;That's it for now! Keep coding and stay awesome. Catch you later!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>beginners</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>What is Feature Switching in .NET 9 ?!</title>
      <dc:creator>Hamza</dc:creator>
      <pubDate>Fri, 22 Nov 2024 13:40:23 +0000</pubDate>
      <link>https://forem.com/1hamzabek/what-is-feature-switching-in-net-9--51oi</link>
      <guid>https://forem.com/1hamzabek/what-is-feature-switching-in-net-9--51oi</guid>
      <description>&lt;p&gt;Today's topic is going to be about .Net 9 . Covering new features with examples 👌.&lt;/p&gt;

&lt;p&gt;Let's get started!&lt;/p&gt;

&lt;blockquote&gt;
&lt;h2&gt;
  
  
  Feature switching
&lt;/h2&gt;
&lt;/blockquote&gt;

&lt;p&gt;So Feature Switching is basically like Feature Flagging, But with Microsoft built-in support.&lt;/p&gt;

&lt;p&gt;That's awesome isn't ?&lt;/p&gt;

&lt;p&gt;Imagine we have a class and a method called &lt;code&gt;DoThing&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Features&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;internal&lt;/span&gt; &lt;span class="k"&gt;static&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;DoThing&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt;
   &lt;span class="n"&gt;Console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;WriteLine&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Do a Thing"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So i want to enable this feature for specific execution or API Testing etc... Here it comes the Feature Switching.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;internal&lt;/span&gt; &lt;span class="k"&gt;static&lt;/span&gt; &lt;span class="kt"&gt;bool&lt;/span&gt; &lt;span class="n"&gt;IsFeatureEnabled&lt;/span&gt; &lt;span class="p"&gt;=&amp;gt;&lt;/span&gt;
       &lt;span class="n"&gt;AppContext&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;TryGetSwitch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Feature.IsEnabled"&lt;/span&gt; &lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;out&lt;/span&gt; &lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;IsEnabled&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;IsEnabled&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;"Feature.IsEnabled"&lt;/code&gt; This is the Switch's name.&lt;br&gt;
&lt;code&gt;out var IsEnabled&lt;/code&gt; This is declaring a variable &lt;code&gt;IsEnabled&lt;/code&gt; That will store the result of the method. The &lt;code&gt;out&lt;/code&gt; Indicates that the value will be assigned to this vartiable.&lt;/p&gt;

&lt;p&gt;Let's get back to our main class and try to call this method&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;using&lt;/span&gt; &lt;span class="nn"&gt;FeatureSwitching&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Feature&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;IsEnabled&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;Features&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;DoThing&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;//output : Do a Thing&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here we still get the method called, Because i have to specify whether i want the method to be Enabled or Disabled (&lt;em&gt;&lt;strong&gt;It's automatically Enabled&lt;/strong&gt;&lt;/em&gt;)&lt;/p&gt;

&lt;p&gt;How can we market and specify a method ?!&lt;/p&gt;

&lt;p&gt;Let's add this to the feature class&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nf"&gt;FeatureSwitchDefinition&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Feature&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;IsEnabled&lt;/span&gt;&lt;span class="p"&gt;)]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Make sure to use the Method's name &lt;code&gt;"Feature.IsEnabled"&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Now, Let's move to .csproj and specify the method 🏃‍♂️:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;ItemGroup&amp;gt;
     &amp;lt;RuntimeHostConfigurationOption Include="Feature.IsEnabled" Value="False" Trim="True"/&amp;gt;
&amp;lt;/ItemGroup&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When you try now to run the code, you aren't going to see output because the switch is Disabled, other words False!&lt;/p&gt;

&lt;p&gt;Try enabling the switch and let me know what you see!&lt;/p&gt;

&lt;h2&gt;
  
  
  Key Benefits 🗝️ :
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Backward Compatibility&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Granular Control&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Configuration Management&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Here's the end of today's article. See you later guys 👋!&lt;/p&gt;

</description>
      <category>dotnet</category>
      <category>programming</category>
      <category>news</category>
      <category>webdev</category>
    </item>
    <item>
      <title>SouthMart : My New Project is Here Finally</title>
      <dc:creator>Hamza</dc:creator>
      <pubDate>Thu, 22 Aug 2024 00:31:33 +0000</pubDate>
      <link>https://forem.com/1hamzabek/southmart-my-new-project-is-here-finally-539</link>
      <guid>https://forem.com/1hamzabek/southmart-my-new-project-is-here-finally-539</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;What is SouthMart ?! What technologies are used ?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;SouthMart is a multi-tenant e-commerce platform where users can sell or purchase a wide range of products. Similar to Amazon, AliExpress, or eBay, SouthMart provides a comprehensive online marketplace experience. In the end of this article there is an overview of the technologies used in developing this project:&lt;/p&gt;




&lt;p&gt;Features Overview :&lt;/p&gt;

&lt;p&gt;User Experience: Users can sign up or log in to easily browse through products, add or remove items from their cart, and proceed to checkout. Before placing an order, users are prompted to provide their location and select a payment method. Once an order is placed, users can track their order, receive an invoice, and view their order history.&lt;/p&gt;

&lt;p&gt;Seller Experience: Sellers can request an account, which the admin can approve or reject. Upon approval, sellers can access a dashboard where they can manage their products, view sales data, and track orders.&lt;/p&gt;

&lt;p&gt;Admin Management: Admins can review seller account requests and manage orders to ensure timely delivery.&lt;/p&gt;




&lt;h2&gt;
  
  
  1: Home Page
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff42xecu25ckqccm1uyij.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff42xecu25ckqccm1uyij.png" alt="Home page" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you can see the navigation bar has Filter using categories or searching manual.&lt;/p&gt;

&lt;p&gt;On the other side you have the profile : &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3bmpnj7d9tbmchswowyr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3bmpnj7d9tbmchswowyr.png" alt="profile items" width="306" height="282"&gt;&lt;/a&gt;&lt;br&gt;
Here as you can see you can get into the settings, or Track orders and surely you get your old orders. And also you can find your liked products in the Wish list.&lt;/p&gt;

&lt;p&gt;If you are asking where the Cart is??&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fca49q96npxueio3upkh2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fca49q96npxueio3upkh2.png" alt="Cart" width="800" height="330"&gt;&lt;/a&gt;&lt;br&gt;
Easy.. Just click on (Your Cart).&lt;/p&gt;

&lt;p&gt;Before we end the Home page, I made 3 Algorithms &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Random Products Algorithm : This gets 10 products randomly&lt;/li&gt;
&lt;li&gt;Best Selling Algorithm : Get the Top 10 selling products&lt;/li&gt;
&lt;li&gt;Recently added products algorithm : Get the latest products added to the database&lt;/li&gt;
&lt;li&gt;Popular Products Algorithm : Get the top liked products&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  2: Menu
&lt;/h2&gt;

&lt;p&gt;So how does the menu work?&lt;br&gt;
OK, Let's say you clicked on Phones category what would happen?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqcoaks6nl0ggzqddecfa.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqcoaks6nl0ggzqddecfa.png" alt="menu" width="800" height="389"&gt;&lt;/a&gt;&lt;br&gt;
Great!&lt;/p&gt;

&lt;p&gt;Now let's use the search bar , Note it is live-search results ;)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkst35scarq6bwwn8x04h.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkst35scarq6bwwn8x04h.png" alt="search menu" width="800" height="323"&gt;&lt;/a&gt;&lt;br&gt;
Note i just wrote The first letters 😁&lt;/p&gt;

&lt;p&gt;Ok, Now i want to get into the product is that available??&lt;br&gt;
Yeah sure...&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwk2lwvu9vwzo0ukd8166.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwk2lwvu9vwzo0ukd8166.png" alt="product view" width="800" height="351"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;wait wait wait is that Reviews??&lt;br&gt;
Yep yep&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwzb8582hemm98nwmz1d4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwzb8582hemm98nwmz1d4.png" alt="Reviews" width="800" height="392"&gt;&lt;/a&gt;&lt;br&gt;
Here you can add your opinion. but always remember be respectful ;)&lt;/p&gt;

&lt;p&gt;What if i want to check other products from the same seller is that Ok?&lt;br&gt;
Let me show you.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2emjwnxxhv4zd9t11b01.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2emjwnxxhv4zd9t11b01.png" alt="seller menu" width="800" height="474"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1t2nu0kw3t0nt7m36x7l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1t2nu0kw3t0nt7m36x7l.png" alt="seller menu" width="800" height="368"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;Ok, now i will let you go through the site with your self , see you then!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3ccu2w5r132dp7vibu1y.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3ccu2w5r132dp7vibu1y.png" alt="settings" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffdwgy3iarouk3ut56pg3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffdwgy3iarouk3ut56pg3.png" alt="track order" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmdkl2o5kae4paypr743d.png" alt="Login" width="800" height="800"&gt;
&lt;/h2&gt;

&lt;p&gt;Now for a project like this we surely need a complicated dashboard so the seller can manage and monitor his products.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhxloqm6jsrkahelduohh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhxloqm6jsrkahelduohh.png" alt="Dashboard home" width="800" height="651"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So here i got to use 5 algorithms.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Get sales for last year&lt;/li&gt;
&lt;li&gt;Get sales for current year &lt;/li&gt;
&lt;li&gt;Get sales for last month &lt;/li&gt;
&lt;li&gt;Get sales for current month&lt;/li&gt;
&lt;li&gt;Get sales for last 24h&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;on top of the page you got the : Revenues / Gross Sales and the debit&lt;/p&gt;

&lt;p&gt;Then in the middle right you got a table for the recently added products , on the left you have the chart.&lt;/p&gt;

&lt;p&gt;Then in the bottom you have a notification table, that tells you if a product is out of stock.&lt;/p&gt;

&lt;p&gt;Also there is Add product page &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqvajvla06j4x8inwiam2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqvajvla06j4x8inwiam2.png" alt="add product" width="800" height="379"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And also you can alway check your products and edit them or delete them.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdw7vrmtcr2flgfdgj89o.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdw7vrmtcr2flgfdgj89o.png" alt="product list" width="800" height="374"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;At the end we have orders tracker &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe06wq37umixj71ekcoci.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe06wq37umixj71ekcoci.png" alt="orders" width="800" height="199"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;what if i want to check the order details?&lt;br&gt;
i got you , just click on action and click on Order details&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjvnm1jixv8ypcaejquao.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjvnm1jixv8ypcaejquao.png" alt="order details" width="800" height="395"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Finally we have the profile page &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbqh5mr428mrni6d87pv3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbqh5mr428mrni6d87pv3.png" alt="profile" width="800" height="344"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;This website took me 3 weeks to achieve this features and designs and system's security.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;THIS PROJECT IS FOR TRAINING PURPOSES&lt;/code&gt;&lt;/p&gt;




&lt;p&gt;The Stack :&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;ASP.NET Web API - Handles the backend services, including authentication, data processing, and business logic.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Blazor WebAssembly - Powers the client-side application, providing a rich, interactive user experience directly in the browser.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;HTML, CSS, JavaScript - Core web technologies for structuring and styling the front-end, with JavaScript handling dynamic behaviors.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Technologies :&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;LINQ - For querying collections and databases in a concise and readable manner.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Entity Framework Core - The ORM (Object-Relational Mapper) that manages database access and operations.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;SQL - The database language used for storing and retrieving data.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Razor - A syntax for combining C# and HTML to generate dynamic web content.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;AutoMapper - For mapping between different object models, such as DTOs and entities.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Dependency Injection - Ensures modularity and easy testing by injecting dependencies where needed.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;JWT Authentication - Provides secure user authentication with token-based authorization.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Bootstrap (optional) - For responsive design and styling (if used in your project).&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;p&gt;Project source : &lt;a href="https://github.com/Hamza-Bek" rel="noopener noreferrer"&gt;https://github.com/Hamza-Bek&lt;/a&gt;&lt;/p&gt;

</description>
      <category>aspnet</category>
      <category>opensource</category>
      <category>programming</category>
      <category>github</category>
    </item>
  </channel>
</rss>
