¡@

Home 

c# Programming Glossary: test

When to Use Static Classes in C#

http://stackoverflow.com/questions/241339/when-to-use-static-classes-in-c-sharp

we'll also have trouble replacing production code with test code. Again we can wrap them up but it'll require us to change..

Tips for optimizing C#/.NET programs [closed]

http://stackoverflow.com/questions/2473666/tips-for-optimizing-c-net-programs

Set meaningful measurable customer focused goals. Build test suites to test your performance against these goals under realistic.. measurable customer focused goals. Build test suites to test your performance against these goals under realistic but controlled..

How do I find out which process is locking a file using .NET?

http://stackoverflow.com/questions/317071/how-do-i-find-out-which-process-is-locking-a-file-using-net

line tool Across a Network Locking a USB device Unit test fails with locked file deleting locked file c# file locking..

Parsing JSON using Json.net

http://stackoverflow.com/questions/401756/parsing-json-using-json-net

point reference id 1111 objects attributes OBJECT_NAME test name OBJECT_TYPE test type position x 5 y 7 The only data.. objects attributes OBJECT_NAME test name OBJECT_TYPE test type position x 5 y 7 The only data I really need from this.. point reference id 1111 objects attributes OBJECT_NAME test name OBJECT_TYPE test type position x 5 y 7 static void Main..

Performance differences between debug and release builds

http://stackoverflow.com/questions/4043821/performance-differences-between-debug-and-release-builds

configuration or can you be certain that code that is tested and working fine under the Debug configuration will also work.. pretty reliable code mostly because it has been put to the test millions of times. It is extremely rare to have problems in..

Case insensitive 'Contains(string)'

http://stackoverflow.com/questions/444798/case-insensitive-containsstring

case insensitive share improve this question To test if the string paragraph contains the string word thanks @QuarterMeister..

Casting vs using the 'as' keyword in the CLR

http://stackoverflow.com/questions/496096/casting-vs-using-the-as-keyword-in-the-clr

it refers to may change due to another thread between the test and the cast. That would be a pretty rare situation but I'd.. uses the result. The is and cast or is and as performs a test and then another attempt to convert the value. To put it another..

How do I get the path of the assembly the code is in?

http://stackoverflow.com/questions/52797/how-do-i-get-the-path-of-the-assembly-the-code-is-in

just the one containing the code. Basically my unit test needs to read some xml test files which are located relative.. the code. Basically my unit test needs to read some xml test files which are located relative to the dll. I want the path.. path to always resolve correctly regardless of whether the testing dll is run from TestDriven.NET the MbUnit GUI or something..

Convert generic List/Enumerable to DataTable?

http://stackoverflow.com/questions/564366/convert-generic-list-enumerable-to-datatable

for the object type T . edit re performance query here's a test rig with results Vanilla 27179 Hyper 6997 I suspect that the..

Fastest Way of Inserting in Entity Framework

http://stackoverflow.com/questions/5940225/fastest-way-of-inserting-in-entity-framework

Way of Inserting in Entity Framework i'm looking for the fastest.. of Inserting in Entity Framework i'm looking for the fastest way of INSERTING in Entity Framework i'm asking this because.. slows bulk inserts extremely down. I would do a few simple tests which will very likely improve the performance Call SaveChanges..

Sending email through Gmail SMTP server with C#

http://stackoverflow.com/questions/704636/sending-email-through-gmail-smtp-server-with-c-sharp

an EmailSender project at Codeplex . It's designed for testability and supports my favourite SMTP services such as GoDaddy.. reveal anything post it. I was just enabling this on a test ASP.NET site I was working on and it works. Actually at some.. client.Send myusername@gmail.com myusername@gmail.com test testbody Console.WriteLine Sent Console.ReadLine I also got..

What does the [Flags] Enum Attribute mean in C#?

http://stackoverflow.com/questions/8447/what-does-the-flags-enum-attribute-mean-in-c

the None enumerated constant in a bitwise AND operation to test for a flag because the result is always zero. However you can..

Design - Where should objects be registered when using Windsor

http://stackoverflow.com/questions/1410719/design-where-should-objects-be-registered-when-using-windsor

components in my application DataAccess DataAccess.Test Business Business.Test Application I was hoping to use Castle.. application DataAccess DataAccess.Test Business Business.Test Application I was hoping to use Castle Windsor as IoC to glue.. called Humble Executable a term from the excellent xUnit Test Patterns that doesn't need unit testing in itself. Your tests..

Using IoC for Unit Testing

http://stackoverflow.com/questions/1465849/using-ioc-for-unit-testing

IoC for Unit Testing How can a IoC Container be used for unit testing Is it useful.. but in a unit test you flatten it all down to a single Test Double . You can use dynamic mocks like Moq or RhinoMocks to.. use dynamic mocks like Moq or RhinoMocks to generate the Test Double but it is not required. var dep new Mock IMyDependency..

C# okay with comparing value types to null

http://stackoverflow.com/questions/1972262/c-sharp-okay-with-comparing-value-types-to-null

question can a value type end up being null. public class Test public DateTime ADate DateTime.Now public Test Test test new.. class Test public DateTime ADate DateTime.Now public Test Test test new Test if test.ADate null Console.WriteLine What.. class Test public DateTime ADate DateTime.Now public Test Test test new Test if test.ADate null Console.WriteLine What the..

Getting key of value of a generic Dictionary?

http://stackoverflow.com/questions/255341/getting-key-of-value-of-a-generic-dictionary

return new List TFirst list Create a copy for sanity class Test static void Main BiDictionary int string greek new BiDictionary..

Can't operator == be applied to generic types in C#?

http://stackoverflow.com/questions/390900/cant-operator-be-applied-to-generic-types-in-c

example the code below will always print true even when Test.test B new B new B is called class A public static bool operator.. B A public static bool operator B x B y return false class Test void test T T a T b where T A Console.WriteLine a b c# generics.. love to know why If someone knows please share. namespace TestProject class Program static void Main string args Test a new..

Differences in string compare methods in C#

http://stackoverflow.com/questions/44288/differences-in-string-compare-methods-in-c-sharp

costs Are there more I haven't listed string testString Test string anotherString Another if testString.CompareTo anotherString..

Check if a class is derived from a generic class

http://stackoverflow.com/questions/457676/check-if-a-class-is-derived-from-a-generic-class

GenericClass T GenericInterface T ...... public class Test GenericClass SomeType Is there any way to find out if a Type..

Casting vs using the 'as' keyword in the CLR

http://stackoverflow.com/questions/496096/casting-vs-using-the-as-keyword-in-the-clr

System using System.Diagnostics using System.Linq class Test const int Size 30000000 static void Main object values new..

A generic error occurred in GDI+, JPEG Image to MemoryStream

http://stackoverflow.com/questions/1053052/a-generic-error-occurred-in-gdi-jpeg-image-to-memorystream

MemoryStream dst.Save m format var img Image.FromStream m TEST img.Save C test.jpg var bytes PhotoEditor.ConvertImageToByteArray..

Default Values (of C# variables) Issue in LINQ to SQL Update

http://stackoverflow.com/questions/11186813/default-values-of-c-sharp-variables-issue-in-linq-to-sql-update

1 Prec 0 Scale 0 4 @p1 Input NChar Size 10 Prec 0 Scale 0 TEST @p2 Input Int Size 1 Prec 0 Scale 0 10 @p3 Input NChar Size..

In C#, why can't i test if a event handler is null anywhere outside of the class that it's defined?

http://stackoverflow.com/questions/1246116/in-c-why-cant-i-test-if-a-event-handler-is-null-anywhere-outside-of-the-class

protected void OnSomeEvent EventArgs e CANONICAL WAY TO TEST EVENT. OF COURSE THIS WORKS. if SomeEvent null SomeEvent this..

Why does BinaryWriter prepend gibberish to the start of a stream? How do you avoid it?

http://stackoverflow.com/questions/1488486/why-does-binarywriter-prepend-gibberish-to-the-start-of-a-stream-how-do-you-avo

down to the base case of just opening the file and writing TEST in it. I'm doing this by something like static FileStream fs.. a box to the front of the file and it looks like so TEST with a fun box on the front. Why is this and how can I avoid..

ASP.Net double-click problem

http://stackoverflow.com/questions/1498269/asp-net-double-click-problem

server private Random random new Random private static int TEST 0 public void Page_Load object sender EventArgs ea SetToken.. next Session NextToken next private void DoWork TEST ltlResult.Text DoWork TEST . script head body script language.. next private void DoWork TEST ltlResult.Text DoWork TEST . script head body script language javascript var last null..

How can I compare (directory) paths in C#?

http://stackoverflow.com/questions/2281531/how-can-i-compare-directory-paths-in-c

for case difference Path.GetFullPath test Path.GetFullPath TEST and trailing slash. So the following code should work fine String.Compare..

Why can't I insert a record into my SQL Compact 3.5 database?

http://stackoverflow.com/questions/3899310/why-cant-i-insert-a-record-into-my-sql-compact-3-5-database

cmd conn.CreateCommand cmd.CommandText INSERT INTO TEST test Values 'NWIND' cmd.ExecuteNonQuery finally conn.Close..

C# Active Directory: Get domain name of user?

http://stackoverflow.com/questions/4249139/c-sharp-active-directory-get-domain-name-of-user

DOMAIN username So if there is a user that is part of TEST domain named Steve TEST steve is his login. I'm able to find.. if there is a user that is part of TEST domain named Steve TEST steve is his login. I'm able to find steve in the AD however.. I'm able to find steve in the AD however I also need TEST to be stored along with his AD information. Again I can find..

List<T> readonly with a private set

http://stackoverflow.com/questions/4749021/listt-readonly-with-a-private-set

myList get private set You can still do this myList.Add TEST This should not be allowed I guess you could have public List..

Microsoft JScript runtime error: Object doesn't support this property or method

http://stackoverflow.com/questions/4832845/microsoft-jscript-runtime-error-object-doesnt-support-this-property-or-method

text javascript document .ready function '#test2' .jGrowl TEST theme 'smoke' closer true script BODY a onclick '#test2' .jGrowl.. closer true script BODY a onclick '#test2' .jGrowl 'TEST' href javascript void 0 Sample 3 a c# asp.net jquery share..

String.Equals() not working as intended

http://stackoverflow.com/questions/5080727/string-equals-not-working-as-intended

named Test in my database. Once I pass in a group named TEST I expect it to return the Test which was already in the database... It for some reason does not find the Test and thinks TEST doesn't exist. Here is my query I cannot see why it does not..

Event Bubbling and MVP: ASP.NET

http://stackoverflow.com/questions/8851933/event-bubbling-and-mvp-asp-net

to make it comply with MVP model string monthValueToPass TEST monthPresenter.SetMonth monthValueToPass The expectation is..

A potentially dangerous Request.Form value was detected from the client

http://stackoverflow.com/questions/9130186/a-potentially-dangerous-request-form-value-was-detected-from-the-client

xmlns xsd http www.w3.org 2001 XMLSchema XmlConfig Type TEST DefiningXpath PERSON NAME Index Name Name XPath PERSON NAME..