Did you know that C# has a special data type called a struct? Structures are an efficient way to represent small, immutable data, such as coordinates, colors, or dimensions. They store values directly in memory (stack), which makes them lighter and faster in many scenarios. Ideal for representing something simple, but with complete meaning. #CSharp #Programming #SoftwareDevelopment #Struct #DotNet #CSharpLanguage #CSharpLearning
What is a struct in C#?
More Relevant Posts
-
What exactly is inside a C++ object? This doc explains the object model and its memory layout. ➜Objects hold only data members directly. ➜A hidden vptr is added for classes with virtual functions. ➜Multiple and virtual inheritance add extra pointers for base class management. ➜The vtable is global and not stored within each object. Understanding this helps write more efficient C++ code. #cpp #cplusplus #memorylayout #programming #coding #softwaredevelopment
To view or add a comment, sign in
-
In C#, one could write `DiagnosticAnalyzers` and make them part of the compilation unit! One could also suppress or disable existing ones in various ways, most of which are static, which means either the diagnostic is disabled or enabled for the whole project! But what if we want a more dynamic way? A way, in which the compiler could decide when to suppress and when not? To warn or not to warn, that's the problem! 😅 Here is where `DiagnosticSuppressor` shines, you are asking what are they? Well, in this blog post I am covering them! Of course, there's also a section for testing! 😉 Use this link 👉🏼 https://bit.ly/4p8d99a or scan the QR code! Link to the video in the comments! #Roslyn #DiagnosticAnalyzer #DiagnosticSuppressor #csharp #dotnet #programming #MVPbuzz #Microsoft #SourceGenerator
To view or add a comment, sign in
-
-
🚀 Tried breaking down Pascal’s Triangle in the simplest way 👇 We’ve all seen this pattern(Pascal's Triangle) somewhere but have you ever wondered how it’s actually generated? 🤔 The question is simple: 👉 Given an integer n, generate the first n rows of Pascal’s Triangle. For example, when n = 3 💡 How this approach clicked: While thinking about how each element is formed, I realized that every value in Pascal’s Triangle is just a combination (nCr) and this relation C(n,r)=C(n,r−1)∗(n−r+1)/r , is connecting each next element with the previous one computed. This not only makes the logic cleaner but also eliminates redundant factorial computations. so, here is the code and the dry run of the solution , once you see it this way, Pascal’s Triangle feels surprisingly simple! 😄 #C++ #DSA #ProblemSolving #CodingJourney #PascalTriangle #Programming #Learn #CodeVisualization #WomenInTech
To view or add a comment, sign in
-
-
What is Base64 and how does it help us with binary data? Base64 allows us to represent binary data with human-readable characters in a string! Why might you want to do this? Well... not all forms of data transmission and storage work well with non-human readable characters! Imagine trying to hit a URL with characters you can't even see visually. No thanks! In CSharp it's super easy to go to and from Base64 encoding with bytes and strings! Check out the article: https://lnkd.in/eihx_fP8 #encoding #csharp #dotnet #dotnetcore #programming
To view or add a comment, sign in
-
-
🚀 Day 46 of #100DaysOfCode 📌 LeetCode 844 — Backspace String Compare Today I tackled a problem that looks simple but exposes whether you can simulate string editing efficiently. 🧠 My Intuition Instead of building and modifying strings directly (which is messy and inefficient), I treated the input like a real typing scenario: Use a stack to simulate typing. Push normal characters. Pop when a # appears (acting as backspace). Build the final strings for both inputs and compare them. This makes the whole process clean and avoids unnecessary edge-case headaches. 🔥 Takeaway: When dealing with “string editors,” stacks simplify life. You avoid messy manual string manipulation and let the stack handle the backtracking for you. #leetcode #dsa #javacoding #codingjourney #100daysofcode #leetcode844 #programming
To view or add a comment, sign in
-
-
🚀LeetCode #5 – Longest Palindromic Substring (C++ Solution) Just solved LeetCode Problem #5 — one of those classic challenges that really tests your understanding of string manipulation and dynamic programming. This problem made me slow down and think carefully about how to expand around centers efficiently and optimize without brute force. It’s a great example of how small improvements in logic can drastically change performance. 🧠 Concept: Find the longest substring that reads the same forward and backward. Approach used: Expand Around Center — checking every possible center in O(n²) time but with constant space. 💻 Tech Stack: C++ ⚙️ Focus: Optimization, logic clarity, and clean code structure. Every problem like this strengthens how I think about data patterns — and that’s exactly the kind of mindset I bring into real game logic and system design. #LeetCode #Cplusplus #Coding #ProblemSolving #GameDev #Programming
To view or add a comment, sign in
-
-
n this program, I used a while loop to print numbers from 1 to 10 on the screen. 🎯 It’s a simple example but a great way to understand how loops work in C programming — they help us repeat actions automatically without writing the same line again and again! 🔁 ✨ Concepts Used: ➡️ Variable initialization (n = 1;) ➡️ Loop condition (n <= 10) ➡️ Increment operator (n++) ➡️ Output using printf() Every small program is a step toward writing bigger logic and better code! 🚀 #CProgramming #CodingPractice #WhileLoop #ProgrammingBasics #CodeJourney #LearningByDoing 💻
To view or add a comment, sign in
-
-
From Arrays and Linked Lists to Graphs and Tries, each structure organizes data differently and serves unique real-world purposes — from managing browser history and social networks to building file systems and dictionaries. Whether you’re coding algorithms or optimizing applications, knowing when to use the right structure makes all the difference. Start small, visualize often, and build your foundation strong. 💡 #DataStructures #Programming #SoftwareEngineering #LearnToCode #TechEducation
To view or add a comment, sign in
-
-
🚀 String Views in C++17 and Beyond C++17 introduced `std::string_view`, a non-owning reference to a contiguous sequence of characters. `std::string_view` provides a way to access string data without copying it, improving performance and reducing memory usage. It can be used with both `std::string` objects and C-style strings. `string_view` objects are lightweight and efficient for read-only access to string data. They avoid unnecessary allocations and copies. Learn more on our website: https://techielearns.com #c++ #programming #coding #tech #learning #professional #career #development
To view or add a comment, sign in
-
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development