This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// this delegate is just, so you don't have to pass an object array. _(params)_ | |
public delegate object ConstructorDelegate(params object[] args); | |
public static ConstructorDelegate CreateConstructor(Type type, params Type[] parameters) | |
{ | |
// Get the constructor info for these parameters | |
var constructorInfo = type.GetConstructor(parameters); | |
// define a object[] parameter | |
var paramExpr = Expression.Parameter(typeof(Object[])); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Window x:Class="WPFTestControlMoveMouse.MainWindow" | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
xmlns:local="clr-namespace:WPFTestControlMoveMouse" | |
mc:Ignorable="d" | |
Title="MainWindow" Height="450" Width="800"> | |
<Grid> | |
<Grid.RowDefinitions> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Concurrent; | |
using System.Threading; | |
using System.Threading.Tasks; | |
namespace VanLangen | |
{ | |
public class ASyncThread : IDisposable | |
{ | |
// By JvanLangen. |