.net

Sort String Array As Int

Is there some way to use IComparer with ArrayList.Sort() to sort a group of strings as ints? ...

.Net security Unrestricted permission issue

Hello everyone, I am confused about what does the Unrestricted property of .Net security, as mentioned here, http://msdn.microsoft.com/en-us/library/system.security.permissions.securityattribute.unrestricted.aspx we could give it full or non-full. My confusion is for permission in a straightforward understanding, there should be only t...

Any advantages of binding a list of objects to a grid instead of to a datatable? (.NET)

I have a business object let's say a Customer. I have a DAL method which brings back a datatable of customers. I have a UI which has a grid which will display a list of customers. My question is.. is it OK to bind the grid to the datatable, which means the UI will have a reference to System.Data or should the datatable be converted firs...

Should I learn F#?

Possible Duplicates: Why should a .net developer learn F#? Should I learn F# or functional programming languages in general? I hear F# is really cool but have not learned it? Should I? What can I do with F# that I can't do with C#? Are there real projects written in F#? Are there performances issues? See also: Why shou...

C# Efficient Substring with many inputs

Assuming I do not want to use external libraries or more than a dozen or so extra lines of code (i.e. clear code, not code golf code), can I do better than string.Contains to handle a collection of input strings and a collection of keywords to check for? Obviously one can use objString.Contains(objString2) to do a simple substring check...

.NET hosting for demo projects.

I am a Java programmer looking to learn .NET, particularly C# and F#, to improve my employability. Toward this goal I am creating a website which will have a few demo projects. My hope is to learn C#/F# and the .NET framework by creating this website and then have a finished product to self-advertise and to show potential employers. W...

How can I access the ItemsPanel of a ListBox at runtime in silverlight?

How can I access the ItemsPanel of a ListBox at runtime in silverlight? ...

How does Google Talk get current Music track?

How does Google Talk get the current song played? Can I do this using .net? Edit : Looks like every player has its own SDK for use Winamp : Here is a good thread about the clas to be used : http://forums.winamp.com/showthread.php?postid=2481680 iTunes :http://developer.apple.com/sdk/itunescomsdk.html Windows Media Player : http://msd...

re-run of .net build when using teamcity

I am trying to setup a .net build using Teamcity. We got it to compile and now the problem is once started it keeps building in a loop. Is there a setting I can do to get rid of the multiple runs in Teamcity. I ran the MSbuild from command line using the same solution (.sln) file it works ok and runs only once. Thanks In advance Rega...

Number format string to show only right 2 digits

I know I can use substring or other methods, but I'm just curious if there is something to replace the ? below to have it return "09" String.Format({0:?}, 2009); btw, I came across a good cheat sheet while trying to figure this out... http://john-sheehan.com/blog/wp-content/uploads/msnet-formatting-strings.pdf ...

How can I reference a Master view in a different project in ASP.NET MVC?

I'm creating an ASP.NET MVC solution, and inside I had 2 MVC Website projects. I'm interested in creating a 3rd project called "Shared", where I can reference the shared views/content between the two sites so I have only one place to edit them. WebUI.Site1 (ASP.NET MVC Site) WebUI.Site2 (ASP.NET MVC Site) WebUI.Shared (Newly created A...

in VS2008, where do I configure the "Platform Target" for a (managed) C++ project?

In VS2008, I can specify that a C# assembly should target only the x86 platform by going to the project properties, clicking the "Build" section, and then setting the "Platform target" box. What is the equivalent for an assembly written in C++? ...

What is Aliases for in reference propeties in Visual Studio?

In Visual Studio in your C# project expand References folder. Then look at the properties of any reference. You'll see there Aliases property. In project the property has value "global". Can someone tell me what this property for and how can I use it? Thanks. ...

Winform form closed event

I have 2 forms, Main and Child. When a button is clicked on the Main form, the Child form is loaded. Can I catch from the Main form, when the Child form is closed by subscribing to the closed event of the child form? ...

C# find most recent file in dir

I need to find the most recently modified file in a directory. I know I can loop through every file in a folder and compare File.GetLastWriteTime but is there a better way to do this without looping? ...

Format currency without rounding

I have the need to format a decimal number as currency but I do not wish for any rounding to occur in the process. For example (example culture is en-US) Dim money = 1234.556789D money.ToString("C") ' Yields $1,234.56 (notice the rounding & truncating) money.ToString("C99") ' Yields $1,234.556789000000000000....0 -- close but not perf...

Sending binary data from ASP to .net component

The ASP application allows uploading of image files (jpg, gif, tif). These files are sent to a .net component registered in the GAC of the server. In the component file is encoded using System.Text.Unicode to byte[] array. This encoding is done with some data loss. The byte array has values 253 and 255 in consequetive elements. What cou...

Set default print paper size when printing a pdf generated from crystal reports?

I am using crystal reports (the version that comes with visual studio 2008) to generate a pdf in an asp.net which then gets pulled into a client's browser. Some of these reports are on legal size paper. This means that for these reports our clients have to manually change the paper size in the print dialog every time they print. Of co...

.net, Login.aspx, can't display <img> tag?

I'm actually following a tutorial about creating a login page etc for a web project. It all works and now I am working on layout. I have added an image tag to my login page, as simple as , the src is correct, the image is definitely there, but the image will not show up on the page, why?? The image works if I copy and paste the tag into...

.NET login control inconsistent

I have the following login control using .net membership: <asp:Login ID="l_Main" runat="server" MembershipProvider="SqlProvider" DestinationPageUrl="Pages.aspx" /> Config: <authentication mode="Forms" > <forms path="/ad" loginUrl="/Admin/Login.aspx" name=".ASPXFORMSAUTH" /> </authentication> <membership default...