c# Programming Glossary: todo
How to get difference between two dates in Year/Month/Week/Day? http://stackoverflow.com/questions/1083955/how-to-get-difference-between-two-dates-in-year-month-week-day static DateTime operator DateTime date Period period TODO Implement this public static Period Difference DateTime first.. static Period Difference DateTime first DateTime second TODO Implement this I suggest you implement the operator first which..
What is the best scripting language to embed in a C# desktop application? [closed] http://stackoverflow.com/questions/137933/what-is-the-best-scripting-language-to-embed-in-a-c-sharp-desktop-application options code if result.Errors.HasErrors TODO report back to the user that the script has errored return.. has errored return null if result.Errors.HasWarnings TODO tell the user about the warnings might want to prompt them if..
How to resolve a .lnk in c# http://stackoverflow.com/questions/139010/how-to-resolve-a-lnk-in-c-sharp new ShellLink IPersistFile link .Load filename STGM_READ TODO if I can get hold of the hwnd call resolve first. This handles..
Ignore folders/files when Directory.GetFiles() is denied access http://stackoverflow.com/questions/172544/ignore-folders-files-when-directory-getfiles-is-denied-access static class Program static void Main string path TODO ApplyAllFiles path ProcessFile static void ProcessFile string..
What NoSQL solutions are out there for .NET? [closed] http://stackoverflow.com/questions/1777103/what-nosql-solutions-are-out-there-for-net play with this example live see ServiceStack's Backbone's TODO application retro fitted with a C# Redis back end . Runs on..
How do I call native C++ from C#? http://stackoverflow.com/questions/2211867/how-do-i-call-native-c-from-c namespace System namespace CSCPP public ref class Class1 TODO Add your methods for this class here. public String^ GetText..
Get timestamp from Authenticode Signed files in .NET http://stackoverflow.com/questions/3281057/get-timestamp-from-authenticode-signed-files-in-net to http support.microsoft.com kb 323809 for the origins TODO extract timestamp value if required return true catch Exception..
Units of measure in C# - almost http://stackoverflow.com/questions/348853/units-of-measure-in-c-sharp-almost second return new UnitDouble T first.Value second.Value TODO minus operator equality Example usage var a new UnitDouble Length.m..
Reading csv file http://stackoverflow.com/questions/3507498/reading-csv-file fields parser.ReadFields foreach string field in fields TODO Process field parser.Close It works great for me in my C# projects...
Show Console in Windows Application? http://stackoverflow.com/questions/472282/show-console-in-windows-application int lpdwProcessId STAThread static void Main string args TODO better handling of command args handle help help etc. string..
Can I “multiply” a string (in C#)? http://stackoverflow.com/questions/532892/can-i-multiply-a-string-in-c on some integer value. string snip li ul int multiplier 2 TODO magic code to do this snip multiplier li ul li ul EDIT I know..
Using Xpath With Default Namespace in C# http://stackoverflow.com/questions/585812/using-xpath-with-default-namespace-in-c-sharp need a namespace manager for example XmlElement el ... TODO XmlNamespaceManager nsmgr new XmlNamespaceManager el.OwnerDocument.NameTable..
How to create LINQ Expression Tree with anonymous type in it http://stackoverflow.com/questions/606104/how-to-create-linq-expression-tree-with-anonymous-type-in-it static string GetTypeKey Dictionary string Type fields TODO optimize the type caching if fields are simply reordered that..
How can I get WinForms to stop silently ignoring unhandled exceptions? http://stackoverflow.com/questions/7572995/how-can-i-get-winforms-to-stop-silently-ignoring-unhandled-exceptions private static void HandleUnhandledException Object o TODO Log it Exception e o as Exception if e null private static..
Caching in WCF http://stackoverflow.com/questions/922116/caching-in-wcf object inputs out object outputs object result null TODO You will have more object in the input if you have more parameters.. parameters in your method string angle inputs 1 .ToString TODO create a unique key from the inputs string key angle string.. DiskCache or MemoryCache for the moment provider DiskCache TODO call enterprise library cache manager You can have your own..
How to wait for a BackgroundWorker to cancel? http://stackoverflow.com/questions/123661/how-to-wait-for-a-backgroundworker-to-cancel ... public void CancelDoingStuff _worker.CancelAsync todo Figure out a way to wait for it to be cancelled How can one..
What NoSQL solutions are out there for .NET? [closed] http://stackoverflow.com/questions/1777103/what-nosql-solutions-are-out-there-for-net localhost 6379 redisManager.ExecAs Todo redisTodos var todo new Todo Id redisTodos.GetNextSequence Content Learn Redis Order.. Content Learn Redis Order 1 redisTodos.Store todo Todo savedTodo redisTodos.GetById todo.Id savedTodo.Done true.. 1 redisTodos.Store todo Todo savedTodo redisTodos.GetById todo.Id savedTodo.Done true redisTodos.Store savedTodo redisTodos.DeleteById..
Deserializing XML to Objects in C# http://stackoverflow.com/questions/226599/deserializing-xml-to-objects-in-c-sharp XML to Objects in C# So I have xml that looks like this todo list id type integer # id id name # name name description #.. time tracking tracked type boolean # tracked tracked if todo items are included in the response todo items type array todo.. tracked tracked if todo items are included in the response todo items type array todo item ... todo item todo item ... todo..
Math optimization in C# http://stackoverflow.com/questions/412019/math-optimization-in-c-sharp optimized a couple bits of code I'm left with this on my todo list. It's the activation function for a neural network which..
How do I convert an array of floats to a byte[] and back? http://stackoverflow.com/questions/4635769/how-do-i-convert-an-array-of-floats-to-a-byte-and-back float is 4 bytes 32 bits for int i 0 i floats.Length i todo stuck...I need to append the results to an offset of ret ret..
how to create a text file in asp.net MVC3 using c# http://stackoverflow.com/questions/5099403/how-to-create-a-text-file-in-asp-net-mvc3-using-c-sharp by your browser public FileStreamResult CreateFile todo add some data from your database into that string var string_with_your_data..
Creating a blocking Queue<T> in .NET? http://stackoverflow.com/questions/530211/creating-a-blocking-queuet-in-net class BlockingCollection T CollectionBase IEnumerable todo might be worth changing this into a proper QUEUE private AutoResetEvent..
How to handle WCF exceptions (consolidated list with code) http://stackoverflow.com/questions/6130331/how-to-handle-wcf-exceptions-consolidated-list-with-code timeout. proxy.Abort catch ObjectDisposedException todo handle this duplex callback exception. Occurs when client disappears...
Get all derived types of a type http://stackoverflow.com/questions/857705/get-all-derived-types-of-a-type is 'IsAssignable' I was wondering if theres a better way todo this c# .net share improve this question I'm pretty sure..
Validate assemblies and namespaces in VAB config file http://stackoverflow.com/questions/8900510/validate-assemblies-and-namespaces-in-vab-config-file Creating a VAB contrib project with such feature is on my todo list for years already but I never had the time to do this...
Using JsonConvert.DeserializeObject to deserialize Json to a C# POCO class http://stackoverflow.com/questions/11126242/using-jsonconvert-deserializeobject-to-deserialize-json-to-a-c-sharp-poco-class string Location get set public int Endorsements get set Todo. public string Team get set Todo. summary A collection of the.. int Endorsements get set Todo. public string Team get set Todo. summary A collection of the User's linked accounts. summary.. JsonProperty endorsements public int Endorsements get set Todo. JsonProperty team public string Team get set Todo. summary..
What NoSQL solutions are out there for .NET? [closed] http://stackoverflow.com/questions/1777103/what-nosql-solutions-are-out-there-for-net Sample code showing a complete CRUD app public class Todo public long Id get set public string Content get set public.. localhost 6379 redisManager.ExecAs Todo redisTodos var todo new Todo Id redisTodos.GetNextSequence Content.. localhost 6379 redisManager.ExecAs Todo redisTodos var todo new Todo Id redisTodos.GetNextSequence Content Learn..
Why can't I define a default constructor for a struct in .NET? http://stackoverflow.com/questions/333829/why-cant-i-define-a-default-constructor-for-a-struct-in-net long denominator public Rational long num long denom Todo Find GCD etc. public Rational long num numerator num denominator..
Dependency Injection http://stackoverflow.com/questions/5171779/dependency-injection dataContext _table dataContext.GetTable T public Class TodoService ITodoService IRepository Todo _todoRepository public.. _table dataContext.GetTable T public Class TodoService ITodoService IRepository Todo _todoRepository public TodoService DataContext.. T public Class TodoService ITodoService IRepository Todo _todoRepository public TodoService DataContext dataContext ..
|