.net-3.5 Questions

12

Solved

I would like to ask what you think is the best way (lasts less / consumes less resources) to clear the contents in order to reuse a StringBuilder. Imagine the following scenario: StringBuilder sb ...
Serafinaserafine asked 10/11, 2009 at 16:55

5

Solved

I am selling desktop software written in C# to multiple clients, and having a huge problem: The .NET install. The users of this software are not computer-savvy and usually don't have any version of...
Superorganic asked 29/11, 2009 at 0:27

16

Solved

We upgraded from .NET 2.0 to .NET 3.5. A co-worker of mine is getting the following dialog when attempting to run the ASP .NET web project under the debugger in Visual Studio 2008. He can build fin...
Misdoubt asked 3/8, 2010 at 14:58

4

I'm using Visual Studio Professional 2013, and I'm trying to import an ASP.NET web site whose files were on SVN so that I can run and debug the website locally. I created a new web site and changed...
Bentinck asked 19/5, 2014 at 2:35

6

Solved

Is there a quick way to find out if an object variable's contents supports IEnumerable? Specifically I'm using XPathEvaluate() from System.Xml.XPath, which can return "An object that can contain a ...
Airscrew asked 18/7, 2011 at 15:8

13

What is the difference between IQueryable<T> and IEnumerable<T>? See also What's the difference between IQueryable and IEnumerable that overlaps with this question.
Craze asked 31/10, 2008 at 7:18

3

Solved

I have been reading the SWF format available on Adobe's site and it mentions that in order to save space, variable bits are used to store integers or floats (page 17 in the pdf) I have always work...
Rajkot asked 16/8, 2012 at 0:38

3

I have an assembly that when accessed spins up a single thread to process items placed on a queue. In that assembly I attach a handler to the DomainUnload event: AppDomain.CurrentDomain.DomainUnlo...
Haga asked 22/4, 2010 at 17:47

7

Solved

Are there any known issues when databinding to a control's visible property? The control is always NOT visible regardless of what my property is. Public ReadOnly Property IsRibbonCategory() As Bool...
Whitney asked 8/4, 2009 at 16:21

9

Solved

Is there a simple way to count the number of occurrences of all elements of a list into that same list in C#? Something like this: using System; using System.IO; using System.Text.RegularExpress...
Derouen asked 16/7, 2009 at 17:44

1

I created my first project in Framework 3.5 and i converted to framework 4.5 and its working perfectly. Secondly i tried to add the reference of this project to another project which is created in ...
Countryandwestern asked 7/11, 2013 at 6:4

6

Solved

if I call form.show() on a WinForms object from another thread, the form will throw an exception. Is where any way I can add a new, visible form to the main app thread? Otherwise, how can I open th...
Research asked 16/8, 2012 at 21:9

12

Solved

I would assume there's a simple LINQ query to do this, I'm just not exactly sure how. Given this piece of code: class Program { static void Main(string[] args) { List<Person> peopleList1...
Plonk asked 15/10, 2010 at 18:0

11

Solved

I can't seem to find any way to add a horizontal separator in a MenuStrip. Visual Studio complains Cannot add ToolStropSeparator to MenuStrip. Any idea's how I can do this?
Groceryman asked 2/2, 2009 at 19:45

9

Solved

I have the following code: Func<string, bool> comparer = delegate(string value) { return value != "0"; }; However, the following does not compile: var comparer = delegate(string value) {...
Bathurst asked 11/2, 2011 at 4:17

8

Solved

I am trying to write a (elevated privilege) service that will talk to a non privileged winforms application. I was able to have two console applications (one elevated one not) talk back and forth n...
Imhoff asked 13/8, 2010 at 15:6

5

Solved

This might be a duplicate (question) but I am looking specifically for the .NET best practice. How to store database connection strings, username and password etc. in a safe way? Is an encrypted a...
Mesne asked 14/8, 2009 at 10:37

23

Solved

I'm wanting to parse a string into a nullable int in C#. ie. I want to get back either the int value of the string or null if it can't be parsed. I was kind of hoping that this would work int? va...
Fun asked 5/9, 2008 at 0:22

3

Solved

I need to get string with 8 '*' symbols. How can I do that in .NET 3.5? .NET 4.0? Thanks.
Acrylyl asked 28/12, 2010 at 15:5

4

Solved

Trying to search through a DataList, with the parameters being movie genres (loaded through a database, so no switch case) and a name protected void ButtonFilter_Click(object sender, EventArgs e) ...
Fizzy asked 4/6, 2015 at 8:5

13

Solved

I am getting the error: Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack. I have redirected to a new page in repeater's itemcommand eve...
Bearnard asked 11/1, 2010 at 11:29

3

Solved

I am deserializing some nested JSON with the following: string json = @"{ ""name"": ""charlie"", ""someID"": 123, ""level1"" : { ""name"": ""charlie 1"", ""someID"": 456 } }"; JavaScriptSer...
Arhat asked 13/9, 2012 at 8:51

16

Solved

What I have is an object that has an IsReadOnly property. If this property is true, I would like to set the IsEnabled property on a Button, ( for example ), to false. I would like to believe that ...
Lipetsk asked 24/6, 2009 at 16:59

2

Solved

I've written a little apllication that creates a named pipe server and a client that connects to it. You can send data to the server, and the server reads it successfully. The next thing I need to...
Oquassa asked 8/12, 2011 at 17:11

11

Solved

I've a piece of code: using (StreamReader stream = new StreamReader(file.OpenRead(), Encoding)) { char[] buffer = new char[chunksize]; while (stream.Peek() >= 0) { int readCount = stream.Rea...
Thereof asked 21/2, 2011 at 14:33

© 2022 - 2024 — McMap. All rights reserved.