Wednesday, August 31, 2022

C# struct layout and operator overloading

C# struct layout

  1. Struct layout in C# - .NET Concept of the Week - Episode 13
  2. In this episode I talk about struct layout in C#. You will learn how C# structs are represented in memory and you will also learn how you can influence this with the StructLayoutAttribute.

  3. C# Struct: Everything You Need to Know in Lesson 12
  4. This lesson will teach you about C# struct. Our objectives are as follows: Understand the Purpose of structs. Implement a struct. Use a struct.

    Operator Overloading

  5. Does the order of operands matter for an overloaded == operator in C#
  6. I am using a 3rd party tool (Unity3d), where one of the fundamental base classes overloads the == operator (UnityEngine.Object). The overloaded operator's signature is: public static bool operator == (UnityEngine.Object x, UnityEngine.Object y)

  7. Operator overloading (C# reference)
  8. A user-defined type can overload a predefined C# operator. That is, a type can provide the custom implementation of an operation in case one or both of the operands are of that type. The Overloadable operators section shows which C# operators can be overloaded

  9. About Operator Overloading
  10. The principal arithmetic and comparison operators can be adapted for use by your own classes and structs. This is known as operator overloading. This article is a thorough discussion of the syntax as well as which operators can be overloaded and those that can't.

  11. C# explicit and implicit Keywords
  12. Use the explicit and implicit keywords to implement conversions with operators.

  13. Implicit And Explicit Conversions In C#
  14. In my last article about type casting, I explained narrow and widening conversions along with as and is operators. In this article, we shall take casting to a whole new level. At the end, you will learn how readability of code can be improved with implicit and explicit operators.

    With the help of implicit operator, readability of code is improved and now class Money is responsible for all the conversion needed.

    So as to summarize, the implicit keyword should be used to enable implicit conversions between a user-defined type and another type, if the conversion is guaranteed not to cause a loss of data.

  15. Working With Data Types
  16. First thing a programmer looks for is what kind of data types a programming languages has and how to use them. In this part, I will cover C# data types and how to use them in a program.

  17. Static implicit operator
  18. What does static implicit operator mean?

  19. Why must C# operator overloads be static?
  20. Why does C# require operator overloads to be static methods rather than member functions (like C++)? (Perhaps more specifically: what was the design motivation for this decision?)

  21. Writing Implicit and Explicit C# Conversion Operators
  22. Implicit conversion operators are those that don’t require an explicit cast.
    Explicit conversion operators are those that do require an explicit cast.

Monday, August 29, 2022

type converter

need to play around with them...

  1. Dynamic Type Description Framework for PropertyGrid
  2. A framework that allows you to customize your class for PropertyGrid at design-time and/or run-time. Using this framework your can control what properties PropertyGrid shows, how the properties are shown, and when it shows them.

  3. Universal Type Converter
  4. This article is about the different possibilities of type conversion provided by the .NET Framework. At the end, it offers a ready to use solution: the UniversalTypeConverter which converts nearly every type to another type.

  5. Bit Flags Type Converter
  6. An implementation of TypeConverter which allows you to edit bit flag enumerations in the PropertyGrid.

  7. A Vector Type for C#
  8. A guide through a Vector type in C# using Cartesian and Euclidian Geometry

  9. Generics Converter for Basic Types
  10. A generics method to convert an object to a basic type.

  11. .NET Type Conversion Utility
  12. Convert what System.Convert can't.

  13. Transformations Type Converter Library
  14. The transformations library is intended to cover type conversion, enumeration conversion and some additional helper methods.

  15. A Beginner's Tutorial - Type Casting and Type Conversion in C#
  16. This small article discusses about type casting in C#.

Thursday, August 18, 2022

IEnumerable example

IEnumerable

c# ienumerable to array

  1. C# – Best way to convert IList or IEnumerable to Array
  2. However, I want it to return an array of the Entity that I'm selecting, what would be the best way of accomplishing that? I can either enumerate through it and build the array, or use CopyTo() a defined array.

  3. C# IEnumerable vs List and Array
  4. When you should use one over the other and what I learned trying to work this out…

  5. C# IEnumerable Examples: LINQ, Lists and Arrays
  6. IEnumerable. A List, array, and query can be looped over. This makes sense. All these constructs implement methods from IEnumerable.

  7. C# / .NET - convert IEnumerable to array
  8. In this article, we would like to show you how to convert IEnumerable to array in C#.

  9. Best way to convert IList or IEnumerable to Array
  10. I have a HQL query that can generate either an IList of results, or an IEnumerable of results. However, I want it to return an array of the Entity that I'm selecting, what would be the best way of accomplishing that? I can either enumerate through it and build the array, or use CopyTo() a defined array.

Saturday, August 13, 2022

TreeView

TreeView

  1. C# Tutorial 72: How to use TreeView (Add ,Removes Clear , Delete Checked Items from a TreeView)
  2. C# Tutorial 72: How to use TreeView (Add ,Removes Clear , Delete Checked Items from a TreeView)

  3. TreeView (tvw)
  4. TreeView (tvw) - Allows you to display a hierarchy of nodes with parents and child.

  5. C# – Saving content of a treeview to a file and load it later
  6. In my C# WinForms program I have a treeview that only contains parent nodes (so, no childs) it is like a listbox but I needed it because of haveing differet properties of nodes like Name, Tag and Text.

    No I want to be able to save the content of this treeview into a file (Basically a text file which I call it *.MVIA). The question is what is the best way to save all three properties of nodes in a file so it can loaded again later properly?

  7. Loading and Saving a TreeView control to an XML file using XmlTextWriter and XmlTextReader / Controls / C#
  8. The purpose of this article is to demonstrate the saving and loading of System.Windows.Forms.TreeView control from an XML file. XmlTextReader and XmlTextWriter of System.Xml namespace are used for reading and generating XML files respectively. It also demonstrates a simple XML file viewer using a TreeView control.

  9. How to edit treeview xml file and save in Winforms?
  10. My Code wroks. I choose a file and it is shown to Application. How to edit a node by double-clicking it and save it by pressing Crtl+S? Thank you for your help!

  11. Saving content of a treeview to a file and load it later
  12. In my C# WinForms program I have a treeview that only contains parent nodes (so, no childs) it is like a listbox but I needed it because of haveing differet properties of nodes like Name, Tag and Text.

  13. C# — Load a TreeView from JSON, Save a TreeView to JSON
  14. Here are a few snippets of code I needed for internal tools…

  15. BinaryFormatter Class
  16. Serializes and deserializes an object, or an entire graph of connected objects, in binary format.

Friday, August 12, 2022

ChartArea class

ChartArea class

  1. How do I create a canvas in c#?
  2. I am self-taught and am trying to move away from text-based programs and into actual games and apps, but I cannot figure out/understand Microsoft's documentation to create a canvas. When I run this code all I get is the terminal. This is my code currently, copied straight from Microsoft:

  3. A quick look at the ControlPaint class in C#
  4. This class has some methods to draw standard GUI elements

  5. code tutorials
  6. good to watch

  7. Canvas implementation for C#
  8. Design and implementation of canvas in C#

  9. DotNetMatrix: Simple Matrix Library for .NET
  10. A set of C# classes providing basic matrix operations

  11. Sandcastle Conceptual Help: Quick Start
  12. Learn how to write user manuals with the Sandcastle Help Compiler.

  13. A Structured 2D Graphics Framework
  14. Welcome to Piccolo2D! A revolutionary way to create robust, full-featured graphical applications in Java and C#, with striking visual effects such as zooming, animation and multiple representations.

  15. Papers We have Written
  16. Here you'll find an archive of all the papers we have published that are related to Piccolo, it's predecessor toolkits, or zoomable user interfaces in general.

  17. 2D Graphics Primer
  18. This section contains an overview of various 2D graphics concepts related to Piccolo. This is a huge topic which cannot be covered in depth here. But the basics are presented below. In many cases these lower level details are handled for you by Piccolo. But, understanding them will help you to use the framework more efficiently, especially when extending functionality and creating your own types.

  19. API Documentation
  20. Here you'll find detailed documentation of the Piccolo.Java and Piccolo.NET toolkits. Currently there is no API documentation for PocketPiccolo.NET. But, the Piccolo.NET API can be used, since PocketPiccolo.NET is essentially a subset of Piccolo.NET. We will eventually update the Piccolo.NET API docs to say which methods are supported in PocketPiccolo.NET.

  21. Getting Started
  22. Here you will find both basic and advanced tutorials to help you get started using Piccolo. All tutorials provide examples in both Java and C#. This section assumes you have read Piccolo Patterns and have a basic understanding of the concepts presented there.

select point in series

c# chart select point

  1. C# Chart, Windows Forms (Series and Points)
  2. Use the Chart control from Windows Forms to display data in a graphical way. Chart. The Chart control visualizes your data. It displays data in your Windows Forms program as a bar graph or chart. With Chart you can quickly display your data in a colorful graphic controlled by C# code.

  3. Selection of Points or Series in MS Chart
  4. I am look at the System.Windows.Forms.DataVisualization.Charting.Chart class, and I cannot figure out how to enable the selection of points or series (like in Excel charts). Is the functionality there, or do I have to implement it myself?

  5. Chart.HitTest Method
  6. Determines the chart element, if any, that is located at a point defined by the given X and Y coordinates.

  7. Extract nearest X,Y data from line series during mouseover event
  8. I'm doing an evaluation of this product. I'm using VS2015, C#, winforms. I'd like to know how to extract X,Y data from a line series chart at the nearest data point to where I mouse over the plotted line in the chart.

  9. GDI+ Line/Curve Drawing and Hit Test
  10. Demo application for developing a drawing application using GDI+. Featuring line/curve draw, hit test, and implementation of CObject/CObArray classes.

  11. Hit Testing Lines and Curves
  12. Useful graphics applications, such as CAD or drawing programs, permit the user to select and manipulate graphics objects. This article describes three methods for detecting if the user has selected a line or a curve.

  13. hit test project
  14. need to download it soon..

  15. Rectangle.Contains Method
  16. Determines if the specified point is contained within the rectangular region defined by this Rectangle.

Thursday, August 11, 2022

Circle control/Line controls

ellipse

  1. A Better Line Control
  2. A WinForms line control that works how you would expect one to.

  3. LineEditor Control – Line based visual input/output
  4. A line based control for output and optional input, and a discussion of how to create a custom control from the .NET UserControl.

  5. Working With Absolute Positions in .NET Graphics
  6. An absolute set of coordinates to simplify graphics in .NET.

    useful controls

  7. Elliptical/Circular Button
  8. Learn how to draw an Elliptical/Circular button with 3D or popup styles.

  9. RoundButton Windows Control - Ever Decreasing Circles
  10. A Windows round button control in C# with designer support

  11. Aqua Gauge
  12. A Gauge Control Developed using GDI+ with Aqua Skin

  13. A thermometer control
  14. Creating an analog-style thermometer

  15. Elliptical Rotating Picture Tray and Editor
  16. A picture tray that rotates around an ellipse of flexible size and angle, with an editor for C#.

  17. Enhanced XP Button
  18. Enhanced XP Button

  19. NSButton
  20. A button that can be used together with a panel to make ToolBars, or just for everything else buttons are used for

  21. Orbital Mechanics Introduction
  22. Introduction to Orbital Mechanics - 2 Body Problem

  23. Drawing Gears - Circular and Non Circular
  24. Learn about gears and by using the jpg's be able to cut working gears in wood and other materials

  25. A simple WPF LineChart control
  26. A simple WPF chart control that draws a 2D line chart.

  27. Generate and understand NURBS curves
  28. Create B-Spline and NURBS curves and learn how to use and manipulate them.

  29. Numerical Solutions to Vibrations of Bars
  30. WPF-Drawing Canvas Control
  31. A drawing tool program that can create simplified XAML code

  32. Spline Interpolation - history, theory and implementation
  33. Implementation of Bezier curve, Derivative Bezier curve, Cathull-Rom spline, Bessel-Overhauser spline, Lagrange interpolation and convex hull

  34. RoundedButton Control - Demystifying DrawArc
  35. This article presents the RoundedButton control and describes the .Net DrawArc method, the subject of a number of questions on programming forums.

  36. Using SetWorldTransform() to Rotate Basic Shapes by Any Angle
  37. How to use SetWorldTransform() to draw basic shapes rotated by any angle

  38. Clock
  39. Simple clock using line transform

  40. The Anatomy of a WPF Application
  41. An article that both explains the Hows and Whys behind WPF.

  42. Rubberband Lines
  43. Using the rubberband line as a ruler.

  44. Advanced Progressbar
  45. An extended progress bar with support for shape based progress bars and 3D colors.

  46. Magic Graphics
  47. A library that lets you easily manipulate your drawings

  48. The MiniWalker
  49. Do you know what IT is? Take the red pill and find out...

  50. Round Button in C#
  51. this sample code illustrates how to create a custom control, specifically a round button in C# with advanced color effects.

  52. Extensions to DrawTools
  53. DrawTools library extended to include Layers, Zoom, Pan, Rotation

  54. CCanvas - A Reusable Class to Draw a Simple Graph
  55. A reusable class for drawing a simple graph

  56. Custom Button with Color and Shape
  57. Another simple custom button control with color and shape.

  58. Introduction to GDI+ in .NET
  59. In this article, we’ll see basics of GDI+ and how GDI+ is much better interface than its predecessor GDI.

  60. Custom ProgressBar Control
  61. Easy to use ProgressBar Control with many properties

  62. WPF Arc!
  63. Filling one of the ugliest WPF gaps: Animatable EllipticalArcGeometry and EllipticalArcShape

  64. Drawing and Editing Lines with GDI+
  65. Here's the code to implement a basic graphic user interface to paint, and then edit, lines on a PictureBox.

  66. Charts for Windows Application using C#
  67. Create charts using inbuilt functions of .NET Framework in window application and C#

  68. A rotating gauge
  69. An article on a custom control in the form of a rotating gauge.

  70. Border Container
  71. A collapsable container control with complete header, border, and color customization. Also has the ability to utilize an 'Activation' button (like the 'Active Files' button you'll find at the top of every form in the Visual Studio IDE).

  72. Things to do in Graphics Land
  73. Basic and advanced graphics via C#.

  74. A Control to Display Pie (and Doughtnut) Charts with Highly Customizable Formatting
  75. An extension of "A control to display pie charts with highly customizable formatting" from mattsj1984 that also renders doughnut.

  76. Dragging Elements in a Canvas
  77. Discusses a class which provides automated dragging of elements in a WPF Canvas.

  78. Graph Library
  79. This article addresses the construction of a simple graph library using C#.

Tuesday, August 9, 2022

HEX editor

HEX editor

  1. Hex Control for C++/Win32 applications.
  2. Fully featured Hex Control written in C++ with the help of the MFC library.

  3. HxD - Freeware Hex Editor and Disk Editor
  4. HxD is a carefully designed and fast hex editor which, additionally to raw disk editing and modifying of main memory (RAM), handles files of any size.

  5. Free Hex Editor Neo
  6. Modify your large files with Free version of HHD Software Hex Editor Neo

  7. 27 Best Free Hex Editor Software For Windows
  8. Here is a list of best free Hex editor software for Windows. These software let you open, view, and edit Hexadecimal files. Usually, normal text editor software don’t let you edit hex codes. You need special software to edit hex code file. This article will introduce you to a list of best free hex editor software. Here you will learn how to edit hex files and related operations to edit hex code.

  9. WerWolv / ImHex
  10. A Hex Editor for Reverse Engineers, Programmers and people who value their retinas when working at 3 AM.

  11. 010 Editor: Pro Text Editor
  12. Edit text files, XML, HTML, Unicode and UTF-8 files, C/C++ source code, PHP, etc. Unlimited undo and powerful editing and scripting tools. Huge file support (50 GB+). Column mode editing.

Monday, August 8, 2022

virtual machine

  1. LC-3 VM
  2. This is a tutorial and source code for creating a VM of the LC3 computer.

  3. Write your Own Virtual Machine
  4. Write your Own Virtual Machine

  5. A Virtual Machine
  6. We’ve spent a lot of time talking about how to represent a program as a sequence of bytecode instructions, but it feels like learning biology using only stuffed, dead animals. We know what instructions are in theory, but we’ve never seen them in action, so it’s hard to really understand what they do. It would be hard to write a compiler that outputs bytecode when we don’t have a good understanding of how that bytecode behaves.

Saturday, August 6, 2022

SOLID

SOLID

  1. SOLID Principles: The Open Closed Principle -> What, Why and How
  2. SOLID principles: The Open Closed Principle, a simple example in C#

interpreter in C#

interpreter

more pages on codeproject

  1. CSI: A Simple C# Interpreter
  2. CSI: A Simple C# Interpreter

  3. Crafting an interpreter Part 1 - Parsing and Grammars
  4. First of a series of articles on building a language interpreter, describing basics about parsing and grammars.

  5. Crafting an interpreter Part 2 - The Calc0 Toy Language
  6. Second article on building a language interpreter describing error handling and direct evaluation during parsing.

  7. Crafting an interpreter Part 3 - Parse Trees and Syntax Trees
  8. Third article on building a language interpreter describing the generation of parse trees and syntax trees.

  9. Introducing R# Language
  10. R# language is a kind of R liked language implements on .NET environment

byte type -> Tokenizer - > Lexer -> Parser

need to write or replicate MyBasic script in C# and write an article...

    Basic Types

  1. Byte Struct
  2. Represents an 8-bit unsigned integer.

    public readonly struct Byte : IComparable, IComparable <byte >, IConvertible, IEquatable <byte >, ISpanFormattable

    Inheritance: Object -> ValueType ->Byte

  3. Integral numeric types (C# reference)
  4. The integral numeric types represent integer numbers. All integral numeric types are value types. They're also simple types and can be initialized with literals. All integral numeric types support arithmetic, bitwise logical, comparison, and equality operators.

  5. Floating-point numeric types (C# reference)
  6. The floating-point numeric types represent real numbers. All floating-point numeric types are value types. They are also simple types and can be initialized with literals. All floating-point numeric types support arithmetic, comparison, and equality operators.

  7. Structure types (C# reference)
  8. A structure type (or struct type) is a value type that can encapsulate data and related functionality. You use the struct keyword to define a structure type:

  9. char (C# reference)
  10. The char type keyword is an alias for the .NET System.Char structure type that represents a Unicode UTF-16 character.

  11. Enumeration types (C# reference)
  12. An enumeration type (or enum type) is a value type defined by a set of named constants of the underlying integral numeric type. To define an enumeration type, use the enum keyword and specify the names of enum members:

    tokenizer class

  13. A List of Useful Articles from MSDN Magazine
  14. Stuff I've found useful and interesting

  15. Free BASIC Compilers and Interpreters
  16. The term BASIC, an acronym for Beginner's All-purpose Symbolic Instruction Code, actually describes a whole plethora of computer languages, not all of which are actually compatible with each other. On many home computers, the earliest implementations of the BASIC language was as a very simple line oriented interpreter. The simplicity of the original language made it easy for beginners to learn programming, giving rise to a whole generation of programmers who cut their teeth on this language (although it must be said that the language's simplicity also led to a host of bad programming practices as programmers tried to work around the language's limitations). Today, however, the language has grown very large and is split into a number of different dialects (many of which bear little resemblance to the original BASIC language) and includes support for many modern programming paradigms like structured programming (using functions or procedures) and object-oriented programming, etc.

  17. Chipmunk Basic
  18. Chipmunk Basic is an interpreter for the BASIC Programming Language. It runs on multiple OS platforms, and is reasonably fast for a pure interpreter. Chipmunk Basic presents a traditional (vintage) terminal-command-line programming environment, and supports a simple, old-fashioned, and easy-to-learn dialect of the Basic Programming Language. (Line numbers are required when using the built-in command-line console, but are not required in Basic programs written using an external text editor.) The language also supports a few advanced extensions. Free for educational and personal use.

  19. Tokenizer - Data Extraction Library
  20. Tokenizer is a .NET Standard and .NET Framework library that allows you to extract information from text using predefined patterns. Tokens embedded within patterns are extracted, validated and transformed before being returned as a strongly typed object:

  21. How to Build a Tokenizer/Lexer Generator in C#
  22. Build a full featured tokenizer generator in C#

  23. C# tokenizer
  24. good list

    Parser Tools - Must Read

  25. Parsing In C#: Tools And Libraries
  26. This is an article similar to a previous one we wrote: Parsing in Java, so the introduction is the same. Skip to chapter 3 if you have already read it.

    good gateway...

  27. MyBasic - A Custom-BASIC language interpreter written in C++
  28. A Custom-BASIC language interpreter written in C++

  29. String Tokenizer class
  30. A customizable string tokenizer.

  31. Bird Programming Language: Part 1
  32. A new general purpose language that aims to be fast, high level and simple to use.

  33. Irony - .NET Compiler Construction Kit
  34. Introduction to Irony - a new technology of parser/compiler construction for .NET.

  35. Writing Your First Domain Specific Language, Part 1 of 2
  36. A guide to writing a compiler in .NET for beginners, using Irony.

  37. Script.NET a language for embedding scripting functionality into CLR Applications
  38. Scripting language for .NET Framework 2.0. Supports native .NET Types, Dynamic casting, Meta programming.

  39. 68 Resources To Help You To Create Programming Languages
  40. 68 Resources To Help You To Create Programming Languages

  41. The ANTLR Mega Tutorial
  42. Parsers are powerful tools and using ANTLR you could write all sort of parsers, usable from many different languages.

  43. Learn to Build Professional Parsers
  44. Learn everything you need to parse, starting from scratch: you can start building a parser today. Nobody dreams of building a parser. You need a parser for something. We can help get you there faster.

  45. The complete guide to (external) Domain Specific Languages
  46. This guide will show you:

    1. the what: after a definition we will look into 19 examples of DSLs
    2. the why: what are the concrete benefits you can achieve using DSLs
    3. the how: we will discuss the different ways to build a DSLs and what are the success factors

Monday, August 1, 2022

SQL editor and FTP partial downloader

SQL editor and FTP downloader

  1. Articles by Elmue (Articles: 20)
  2. many good articles

  3. Partial FTP Downloader
  4. An article about a partial FTP Downloader

  5. Graph3D: A Windows.Forms Render Control in C#
  6. An easy to use 3D control which can be integrated into an application in a few minutes

  7. SQL Editor for Database Developers
  8. SQL editor with syntax parser, direct editing, code execution, database backup, table comparison, script generation, time measurement

  9. Visual Studio Project Renamer
  10. A utility that renames Visual Studio projects

  11. Awesome .NET Library!
  12. A collection of awesome .NET libraries, tools, frameworks, and software.

  13. Writing data into CSV file in C#
  14. I am trying to write into a csv file row by row using C# language. Here is my function

    another PDF Library

  15. Create PDF from Images using VB.NET
  16. Create PDF from Image files using VB.NET and PDFSharp library.

  17. PDFsharp & MigraDoc
  18. Information about PDFsharp’s features¶ Key Features¶

    1. Creates PDF documents on the fly from any .NET language
    2. Easy to understand object model to compose documents One source code for drawing on a PDF page as well as in a window or on the printer Modify, merge, and split existing PDF files Images with transparency (color mask, monochrome mask, alpha mask) Newly designed from scratch and written entirely in C#
    3. The graphical classes go well with .NET

  19. Convert a Windows Form to PDF
  20. This article shows how to save a Windows Form to a PDF file.

  21. Create PDF from Images using VB.NET
  22. Create PDF from Image files using VB.NET and PDFSharp library.

  23. Digital Signatures and PDF Documents
  24. PDFKit.NET 2.0 is a 100% .NET (verifiable) component for creating and manipulating PDF documents. In this article I will focus on its digital signature capabilities. Digital signatures can be used to authenticate the source of a PDF document, and to provide the integrity of a PDF document.

  25. Converting Multiple Image Files to PDF
  26. A tip on converting multiple image files (BMP, PNG, GIF, JPEG, TIFF) to single or multiple PDF

  27. Basics of PDF graphics and how to edit
  28. This article explains the basics of PDF graphics and how graphics can be edited if you really have to.