¡@

Home 

c# Programming Glossary: miscutil

Non-repetitive random number C#

http://stackoverflow.com/questions/1011198/non-repetitive-random-number-c-sharp

numbers you might want to look at my StaticRandom class in MiscUtil . Note that using rng.Next 1 21 would also work fine I happen..

Generics - where T is a number?

http://stackoverflow.com/questions/1267902/generics-where-t-is-a-number

.NET 3.5 then I have a generic operators implementation in MiscUtil free etc . This has methods like T Add T T x T y and other variants..

Solution for overloaded operator constraint in .NET generics

http://stackoverflow.com/questions/147646/solution-for-overloaded-operator-constraint-in-net-generics

second implicit T here It can be downloaded as part of MiscUtil Additionally in C# 4.0 this becomes possible via dynamic static..

BinaryWriter Endian issue

http://stackoverflow.com/questions/1540251/binarywriter-endian-issue

this question You can use my EndianBinaryWriter in MiscUtil . That lets you specify the endianness you want. There's also..

C# equivalent of python's struct.pack

http://stackoverflow.com/questions/1818242/c-sharp-equivalent-of-pythons-struct-pack

you can use my EndianBinaryWriter EndianBitConverter from MiscUtil . One extra feature of my EndianBitConverter is that you can..

Can I specify my explicit type comparator inline?

http://stackoverflow.com/questions/188120/can-i-specify-my-explicit-type-comparator-inline

c# .net linq lambda share improve this question My MiscUtil library contains a ProjectionComparer to build an IComparer..

C# little endian or big endian?

http://stackoverflow.com/questions/217980/c-sharp-little-endian-or-big-endian

choice. The same goes for BinaryReader BinaryWriter. My MiscUtil library has an EndianBitConverter class which allows you to..

Copy values from one object to another

http://stackoverflow.com/questions/2624823/copy-values-from-one-object-to-another

Jon Skeet and Marc Gravell have a library called MiscUtil . Inside MiscUtil.Reflection there is a class called PropertyCopy.. and Marc Gravell have a library called MiscUtil . Inside MiscUtil.Reflection there is a class called PropertyCopy that does exactly.. System.Linq.Expressions using System.Reflection namespace MiscUtil.Reflection summary Generic class which copies to its target..

Is there any way to close a StreamWriter without closing it's BaseStream?

http://stackoverflow.com/questions/2666888/is-there-any-way-to-close-a-streamwriter-without-closing-its-basestream

everything else along. I have an implementation of that in MiscUtil if you want to grab it from there. share improve this answer..

Looking for *small*, open source, c# project with extensive Unit Testing

http://stackoverflow.com/questions/287646/looking-for-small-open-source-c-sharp-project-with-extensive-unit-testing

testing open source share improve this question My MiscUtil library has variable test coverage some parts are very thoroughly..

Mark parameters as NOT nullable in C#/.NET?

http://stackoverflow.com/questions/291340/mark-parameters-as-not-nullable-in-c-net

will help a lot. I also have an extension method in MiscUtil called ThrowIfNull which makes it a bit simpler. One final point..

How to read a text file reversely with iterator in C#

http://stackoverflow.com/questions/452902/how-to-read-a-text-file-reversely-with-iterator-in-c-sharp

have some subtle bugs around. It uses StreamUtil from MiscUtil but I've included just the necessary new method from there at.. using System.IO using System.Text namespace MiscUtil.IO summary Takes an encoding defaulting to UTF 8 and a function..

How to copy value from class X to class Y with the same property name in c#?

http://stackoverflow.com/questions/531505/how-to-copy-value-from-class-x-to-class-y-with-the-same-property-name-in-c

Expression . Jon Skeet has a pre rolled sample of this in MiscUtil just use as Student source ... StudentDTO item PropertyCopy..

Apply properties values from one object to another of the same type automatically?

http://stackoverflow.com/questions/930433/apply-properties-values-from-one-object-to-another-of-the-same-type-automaticall

to sql share improve this question I have a type in MiscUtil called PropertyCopy which does something similar although it.. I'll see what I can do. I'm not really ready to do a full MiscUtil release but here's the updated code including comments. I'm.. System.Linq.Expressions using System.Reflection namespace MiscUtil.Reflection summary Non generic class allowing properties to..

Is there an option “go to line” in TextReader/StreamReader?

http://stackoverflow.com/questions/931976/is-there-an-option-go-to-line-in-textreader-streamreader

You can use my LineReader class either the one in MiscUtil or a simple version here to implement IEnumerable string and..