c# Programming Glossary: in
Create Excel (.XLS and .XLSX) file from C# [closed] http://stackoverflow.com/questions/151005/create-excel-xls-and-xlsx-file-from-c-sharp party dependencies to my code and I would like to avoid using Excel directly to create the file using OLE Automation. The.. like to avoid using Excel directly to create the file using OLE Automation. The .CSV file solution is easy and is the current.. file solution is easy and is the current way I am handling this but I would like to control the output formats. EDIT I..
How to properly clean up Excel interop objects http://stackoverflow.com/questions/158706/how-to-properly-clean-up-excel-interop-objects to properly clean up Excel interop objects I'm using the Excel interop in C# ApplicationClass.. to properly clean up Excel interop objects I'm using the Excel interop in C# ApplicationClass and have placed the.. clean up Excel interop objects I'm using the Excel interop in C# ApplicationClass and have placed the following code..
Encrypt/Decrypt string in .NET http://stackoverflow.com/questions/202011/encrypt-decrypt-string-in-net Decrypt string in .NET Can someone give me the code to Encrypt and Decrypt.. Decrypt string in .NET Can someone give me the code to Encrypt and Decrypt a.. Can someone give me the code to Encrypt and Decrypt a string in C# c# .net encryption mono cryptography share improve..
Dynamic LINQ OrderBy on IEnumerable<T> http://stackoverflow.com/questions/41244/dynamic-linq-orderby-on-ienumerablet LINQ OrderBy on IEnumerable T I found an example in the VS2008 Examples for Dynamic LINQ that allows you to use.. for Dynamic LINQ that allows you to use a sql like string e.g. OrderBy Name Age DESC for ordering. Unfortunately the.. use a sql like string e.g. OrderBy Name Age DESC for ordering. Unfortunately the method included only works on IQueryable..
Why are mutable structs evil? http://stackoverflow.com/questions/441309/why-are-mutable-structs-evil are mutable structs evil Following the discussions here on SO I already read several times the.. times the remark that mutable structs are evil like in the answer to this question . What's the actual problem with.. are passed around. So if you change a copy you are changing only that copy not the original and not any other copies which..
Random number generator only generating one random number http://stackoverflow.com/questions/767999/random-number-generator-only-generating-one-random-number number generator only generating one random number I have the following function Function to.. only generating one random number I have the following function Function to get random number public static int RandomNumber.. function Function to get random number public static int RandomNumber int min int max Random random new Random return..
Deep cloning objects in C# http://stackoverflow.com/questions/78536/deep-cloning-objects-in-c-sharp cloning objects in C# I want to do something like myObject myObj GetmyObj.. cloning objects in C# I want to do something like myObject myObj GetmyObj Create.. cloning objects in C# I want to do something like myObject myObj GetmyObj Create and fill a new object myObject..
How do you do a deep copy an object in .Net (C# specifically)? http://stackoverflow.com/questions/129389/how-do-you-do-a-deep-copy-an-object-in-net-c-specifically object in .Net C# specifically I want a true deep copy. In Java this was easy but how do you do it in C# c# .net serialization..
Cross-thread operation not valid: Control accessed from a thread other than the thread it was created on http://stackoverflow.com/questions/142003/cross-thread-operation-not-valid-control-accessed-from-a-thread-other-than-the child usercontrols was created on the primary main thread. In the LOAD method of the usercontrol I'm fetching data based on.. the following code CODE 2 UserContrl1_LoadDataMethod if InvokeRequired Line #1 this.Invoke new MethodInvoker UserContrl1_LoadDataMethod.. UserContrl1_LoadDataMethod if InvokeRequired Line #1 this.Invoke new MethodInvoker UserContrl1_LoadDataMethod return if textbox1.text..
Create Excel (.XLS and .XLSX) file from C# [closed] http://stackoverflow.com/questions/151005/create-excel-xls-and-xlsx-file-from-c-sharp at these to see the best alternative for my solution. Interop will work but it requires Excel to be on the machine you.. few known bugs with each library as noted in the comments. In all EPPlus seems to be the best choice as time goes on. It seems..
String vs string in C# [duplicate] http://stackoverflow.com/questions/215255/string-vs-string-in-c-sharp vs string in C# duplicate In C# what is the difference between String and string note the.. there is no difference. It's like int vs. System.Int32 . As far as guidelines I think it's generally recommended..
Randomize a List<T> in C# http://stackoverflow.com/questions/273313/randomize-a-listt-in-c-sharp System.Random if it's used in the way it was intended. In my first example above I instantiate the rng variable inside..
What is the difference between a field and a property in C#? http://stackoverflow.com/questions/295104/what-is-the-difference-between-a-field-and-a-property-in-c is the difference between a field and a property in C# In C# what makes a field different from a property and when should..
Why is it important to override GetHashCode when Equals method is overridden? http://stackoverflow.com/questions/371328/why-is-it-important-to-override-gethashcode-when-equals-method-is-overridden will be called to see if it is a real equality or not. In this case it looks like return FooId is a suitable GetHashCode..
Casting vs using the 'as' keyword in the CLR http://stackoverflow.com/questions/496096/casting-vs-using-the-as-keyword-in-the-clr these two methods of conversion public interface IMyInterface void AMethod public class MyClass IMyInterface public.. IMyInterface void AMethod public class MyClass IMyInterface public void AMethod Do work Other helper methods...... Other helper methods.... public class Implementation IMyInterface _MyObj MyClass _myCls1 MyClass _myCls2 public Implementation..
When to use struct in C#? http://stackoverflow.com/questions/521298/when-to-use-struct-in-c every time an enumerator is requested ...makes sense. Internal to the Dictionary class. Enumerator is public because.. interface implementation e.g. IEnumerator getter. Update In addition realize that when a struct implements an interface.. struct becomes a reference type and is moved to the heap. Internal to the Dictionary class Enumerator is still a value type...
Creating a blocking Queue<T> in .NET? http://stackoverflow.com/questions/530211/creating-a-blocking-queuet-in-net blocked enqueue Monitor.PulseAll queue return item edit In reality you'd want a way to close the queue so that readers..
Proper use of the IDisposable interface http://stackoverflow.com/questions/538060/proper-use-of-the-idisposable-interface know how to call DeleteHandle on a variable of type IntPtr it doesn't know whether or not it needs to call DeleteHandle.. MSDN yourself it's unmanaged. Anything you've used P Invoke calls to get outside of the nice comfy world of everything.. We do this by overriding the Finalize method. Note In C# you don't explicitly override the Finalize method. You write..
What is the difference between Decimal, Float and Double in C#? http://stackoverflow.com/questions/618535/what-is-the-difference-between-decimal-float-and-double-in-c float and double are floating binary point types . In other words they represent a number like this 10001.10010110011.. the value. decimal is a floating decimal point type . In other words they represent a number like this 12345.65789 Again..
What's the difference between String and string? http://stackoverflow.com/questions/7074/whats-the-difference-between-string-and-string the difference between String and string In C# what is the difference between String and string note the.. there is no difference. It's like int vs. System.Int32 . As far as guidelines I think it's generally recommended..
Deep cloning objects in C# http://stackoverflow.com/questions/78536/deep-cloning-objects-in-c-sharp methods also from the originally referenced source In case you prefer to use the new extension methods of C# 3.0 change..
How to use HTML Agility pack http://stackoverflow.com/questions/846994/how-to-use-html-agility-pack question Download and build the HTMLAgilityPack solution. In your application add a reference to HTMLAgilityPack.dll in the..
Using Excel OleDb to get sheet names IN SHEET ORDER http://stackoverflow.com/questions/1164698/using-excel-oledb-to-get-sheet-names-in-sheet-order Excel OleDb to get sheet names IN SHEET ORDER I'm using OleDb to read from an excel workbook..
Sending an array of values to Oracle procedure to use in WHERE IN clause http://stackoverflow.com/questions/13580245/sending-an-array-of-values-to-oracle-procedure-to-use-in-where-in-clause an array of values to Oracle procedure to use in WHERE IN clause I have a stored procedure in Oracle as shown below CREATE.. CUR OUT SYS_REFCURSOR PARAM_THAT_WILL_BE _USED_INSIDE_WHERE_IN AS BEGIN OPEN CUR FOR SELECT FROM MY_TABLE WHERE.. OUT SYS_REFCURSOR PARAM_THAT_WILL_BE _USED_INSIDE_WHERE_IN AS BEGIN OPEN CUR FOR SELECT FROM MY_TABLE WHERE COL1 IN here..
WHERE IN (array of IDs) http://stackoverflow.com/questions/182060/where-in-array-of-ids IN array of IDs I have webservice which is passed an array of.. endDateTime From tb_bookings WHERE buildingID IN @buildingIDs AND startDateTime @fromDate SqlParameter buildID.. be a single value so you'd have to do WHERE buildingID IN @buildingID1 @buildingID2 @buildingID3... Which of course requires..
How would you do a “not in” query with Linq? http://stackoverflow.com/questions/183791/how-would-you-do-a-not-in-query-with-linq c foreach var c in query Console.WriteLine c from The NOT IN clause in LINQ to SQL by Marco Russo share improve this answer..
HTML Agility Pack strip tags NOT IN whitelist http://stackoverflow.com/questions/3107514/html-agility-pack-strip-tags-not-in-whitelist Agility Pack strip tags NOT IN whitelist I'm trying to create a function which removes html..
multimap in .NET http://stackoverflow.com/questions/380595/multimap-in-net DESIGN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY.. ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY.. AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SOLUTIONS DESIGN OR CONTRIBUTORS BE LIABLE FOR..
Comparison of XSD Code Generators http://stackoverflow.com/questions/386155/comparison-of-xsd-code-generators at this project maintained and great functionality LINQ to XSD Very cool project but not what i was looking for Addendum.. echo.Starting processing XSD files ... for f a IN 'dir XsdPath .xsd a d b s' do call ProcessXsd a echo.Finished..
ASP.NET MVC $.post call returning string…need help with format for jqGrid http://stackoverflow.com/questions/4101116/asp-net-mvc-post-call-returning-string-need-help-with-format-for-jqgrid values for the dropdown formatted like this value FE FedEx IN InTime TN TNT I'm using the StringBuilder to iterate through..
how to do subquery in LINQ http://stackoverflow.com/questions/418609/how-to-do-subquery-in-linq to do subquery in LINQ Here's an example of the query I'm trying to convert to LINQ.. Here's an example of the query I'm trying to convert to LINQ SELECT FROM Users WHERE Users.lastname LIKE ' fra ' AND Users.Id.. FROM Users WHERE Users.lastname LIKE ' fra ' AND Users.Id IN SELECT UserId FROM CompanyRolesToUsers WHERE CompanyRoleId in..
Does Entity Framework 4 Code First have support for identity generators like NHibernate? http://stackoverflow.com/questions/5275306/does-entity-framework-4-code-first-have-support-for-identity-generators-like-nhi class Context DbContext Helper for example DO NOT USE IN REAL SCENARIOS private static int i 0 public DbSet MyEntity..
How to return text from Native (C++) code http://stackoverflow.com/questions/5308584/how-to-return-text-from-native-c-code of things e.g passing string stringbuilder by ref using IN and OUT Marshaling to LPSTR returning string from function etc...
LINQ Expression to return Property value? http://stackoverflow.com/questions/567963/linq-expression-to-return-property-value Expression to return Property value I'm trying to create a.. function to help me select thousands of records using LINQ to SQL from a local list. SQL Server 2005 at least limits queries.. t0 . Id ... t0 . Version FROM Refill AS t0 WHERE t0 . Id IN @p0 @p1 @p2 @p3 @p4 ... That query 4 more times 20 5 4 c# linq..
Entity Framework 4.1. Most efficient way to get multiple entities by primary key? http://stackoverflow.com/questions/8107439/entity-framework-4-1-most-efficient-way-to-get-multiple-entities-by-primary-key actually very slow. It's true that it translates into an IN clause in SQL and that the SQL query itself is executed fast... performance bottleneck is in the translation from your LINQ query into SQL. The expression tree which will be created is.. because there is no native expression which represents an IN . When the SQL is created this expression of many OR s is recognized..
|