c# Programming Glossary: alternatively
Distinct() with lambda? http://stackoverflow.com/questions/1300088/distinct-with-lambda or some equivalent workaround Or am I missing something Alternatively is there a way of specifying an IEqualityComparer inline embarass..
Regular Expression to find a string included between two characters, while EXCLUDING the delimiters http://stackoverflow.com/questions/1454913/regular-expression-to-find-a-string-included-between-two-characters-while-exclu and is followed by a that is not captured lookahead . Alternatively you can just capture what's between the square brackets . and..
(C#) How to check if System.Net.WebClient.DownloadData is downloading a binary file? http://stackoverflow.com/questions/153451/c-how-to-check-if-system-net-webclient-downloaddata-is-downloading-a-binary-f if HeadOnly req.Method GET req.Method HEAD return req Alternatively you can check the header when overriding GetWebRespons perhaps..
Finding the default application for opening a particular file type on Windows http://stackoverflow.com/questions/162331/finding-the-default-application-for-opening-a-particular-file-type-on-windows and action details. Documentation for this is on MSDN . Alternatively you can use the IQueryAssociations interface. share improve..
C# producer/consumer http://stackoverflow.com/questions/1656404/c-sharp-producer-consumer queue. You then add as many tokens as you have threads. Alternatively you have a separate flag to indicate that you want to stop...
Performance of calling delegates vs methods http://stackoverflow.com/questions/2082735/performance-of-calling-delegates-vs-methods associated delegate which the caller could subscribe to. Alternatively I could create an ICallback interface with an OnComplete method..
How to create trial version of .NET software? http://stackoverflow.com/questions/2423976/how-to-create-trial-version-of-net-software license key that unlocks the rest of the functionality. Alternatively you provide a secret download link for a full version. Even..
How Can I Set Processor Affinity in .NET? http://stackoverflow.com/questions/2510593/how-can-i-set-processor-affinity-in-net but have found no example of how that should be used. Alternatively is there any way for TPL Task Parallel Library to execute two..
How to start a Process as administrator mode in C# http://stackoverflow.com/questions/2532769/how-to-start-a-process-as-administrator-mode-in-c-sharp 6 p.StartInfo.Verb runas Alternatively go the manifest route for your application though MSDN is having..
How to get client date and time in ASP.NET? http://stackoverflow.com/questions/274826/how-to-get-client-date-and-time-in-asp-net control if you need to do this in a number of places. Alternatively you could do this with AJAX but the implementation will depend..
how to run a winform from console application? http://stackoverflow.com/questions/277771/how-to-run-a-winform-from-console-application then change the output type to Console Application. Alternatively just add a reference to System.Windows.Forms.dll and start coding..
System.Drawing in Windows or ASP.NET services http://stackoverflow.com/questions/390532/system-drawing-in-windows-or-asp-net-services a dwFlags with WSF_VISIBLE if you have a visible desktop. Alternatively EnumWindowsStations will give you a list of stations which you..
Use linq to generate direct update without select http://stackoverflow.com/questions/445033/use-linq-to-generate-direct-update-without-select foreach var item in qry item.Count 0 dc.SubmitChanges Alternatively you could write the query yourself dc.ExecuteCommand update..
How to get IntPtr from byte[] in C# http://stackoverflow.com/questions/537573/how-to-get-intptr-from-byte-in-c-sharp Call unmanaged code Marshal.FreeHGlobal unmanagedPointer Alternatively you could declare a struct with one property and then use Marshal.PtrToStructure..
Writing large number of records (bulk insert) to Access in .NET/C# http://stackoverflow.com/questions/7070011/writing-large-number-of-records-bulk-insert-to-access-in-net-c column myFields k and then used them. It took 2.8 seconds. Alternatively one could directly access those fields as found in the commented..
Creating Scheduled Tasks http://stackoverflow.com/questions/7394806/creating-scheduled-tasks the task we just created ts.RootFolder.DeleteTask Test Alternatively you can use native API or go for Quartz.NET . See this for details...
Serializing private member data http://stackoverflow.com/questions/802711/serializing-private-member-data xw XmlWriter.Create Console.Out ser.WriteObject xw obj Alternatively you can implement IXmlSerializable and do everything yourself..
using LINQ to remove objects within a List<T> http://stackoverflow.com/questions/853526/using-linq-to-remove-objects-within-a-listt of removing the authors from the previous collection. Alternatively you can use RemoveAll authorsList.RemoveAll x x.FirstName Bob..
How do I get around the “'” problem in sqlite and c#? http://stackoverflow.com/questions/904796/how-do-i-get-around-the-problem-in-sqlite-and-c presented by Robert will work i.e. replacing ' by '' . Alternatively you can use parameters as in DbCommand cmd new DbCommand DbParameter..
Get installed applications in a system http://stackoverflow.com/questions/908850/get-installed-applications-in-a-system Console.WriteLine subkey.GetValue DisplayName Alternatively you can use WMI as has been mentioned ManagementObjectSearcher..
Ignoring a class property in Entity Framework 4.1 Code First http://stackoverflow.com/questions/10385248/ignoring-a-class-property-in-entity-framework-4-1-code-first System.ComponentModel.DataAnnotations namespace. You can alternatively do this with Fluent API . You need to override the OnModelCreating..
Parse XML document in C# http://stackoverflow.com/questions/1238528/parse-xml-document-in-c-sharp doc new XmlDocument doc.Load @ C Path To Xml File.xml Or alternatively if you have the XML in a string use the LoadXml method. Once..
General purpose FromEvent method http://stackoverflow.com/questions/12865848/general-purpose-fromevent-method allow me to set the result of the TaskCompletionSource Or alternatively is there another approach to creating a method that returns..
Alternative to FindMimeFromData method in Urlmon.dll one which has more MIME types http://stackoverflow.com/questions/15300567/alternative-to-findmimefromdata-method-in-urlmon-dll-one-which-has-more-mime-typ could point me to another method with more MIME types or alternatively another method class were I would be able to include the MIME.. could point me to another method with more MIME types or alternatively another method class were I would be able to include the MIME..
Programmatically change the AssemblyVersion and AssemblyFileVersion attributes http://stackoverflow.com/questions/1550249/programmatically-change-the-assemblyversion-and-assemblyfileversion-attributes file directly without resorting to something fanciful. Or alternatively make sure that all your DLLs share one common AssemblyInfo.cs..
Using Protobuf-net, I suddenly got an exception about an unknown wire-type http://stackoverflow.com/questions/2152978/using-protobuf-net-i-suddenly-got-an-exception-about-an-unknown-wire-type var file new FileStream path FileMode.Truncate write or alternatively by SetLength after writing your data file.SetLength file.Position..
C# Color constant R,G,B values http://stackoverflow.com/questions/225953/c-sharp-color-constant-r-g-b-values Color. 0 1 2 3 prop.Name color.R color.G color.B Or alternatively using System using System.Drawing public class Test static void..
How to enumerate all windows belonging to a particular process using .NET? http://stackoverflow.com/questions/2531828/how-to-enumerate-all-windows-belonging-to-a-particular-process-using-net EnumWindows if you want child windows EnumChildWindows or alternatively you can use EnumThreadWindows . DllImport user32.dll CharSet..
Can I set LARGEADDRESSAWARE from within Visual Studio? http://stackoverflow.com/questions/2597790/can-i-set-largeaddressaware-from-within-visual-studio wonder if there is a built in way in Visual Studio 2010 Or alternatively did someone write an MSBuild Task for this Edit This is for..
Throwing ArgumentNullException in constructor? http://stackoverflow.com/questions/3629849/throwing-argumentnullexception-in-constructor inputParemeter inputparameter cannot be empty string alternatively Contract.Requires ArgumentNullException string.IsNullOrEmpty..
C# Deserialize XML to object http://stackoverflow.com/questions/4085529/c-sharp-deserialize-xml-to-object share improve this question Without a full xsd xml or alternatively your C# classes we can't reproduce. But working from the xml..
format date in c# http://stackoverflow.com/questions/501460/format-date-in-c-sharp g new CultureInfo de CH returns 26.05.2009 22 39 Or alternatively you can set the CultureInfo of the current thread prior to formatting..
Pass-through mouse events to parent control http://stackoverflow.com/questions/547172/pass-through-mouse-events-to-parent-control MouseDown MouseMove MouseUp to its parent control or alternatively to the top level form . I can do this by creating handlers for..
How can I save an email instead of sending when using SmtpClient? http://stackoverflow.com/questions/567765/how-can-i-save-an-email-instead-of-sending-when-using-smtpclient the attachment intact impossible I would have thought . Or alternatively upload the messages to a folder in the users account If anyone..
How to get all names of properties in an Entity? http://stackoverflow.com/questions/5851274/how-to-get-all-names-of-properties-in-an-entity in your case is EntityObject var type classObject.GetType alternatively call out directly typeof EntityObject .GetProperties ... var..
BitmapImage to byte[] http://stackoverflow.com/questions/6597676/bitmapimage-to-byte it's the best way how can I perform this conversion Or alternatively is there a better way to save a BitmapImage or any of its base..
This code returns distinct values. However, what I want is to return a strongly typed collection as opposed to an anonymous type http://stackoverflow.com/questions/7336275/this-code-returns-distinct-values-however-what-i-want-is-to-return-a-strongly example must implement implement Equals and GetHashCode or alternatively provide a separate IEqualityComparer T as an argument to Distinct..
servicestack REST API and CORS http://stackoverflow.com/questions/8211930/servicestack-rest-api-and-cors in a service These headers will get sent on every request alternatively you can also enable it for specific web services i.e. take the..
|