| A Wish..... (VIP replies) |
| microsoft.public.dotnet.framework |
| Hi, I see that it's possible to apply attributes to function parameters. Wouldn't it be great if the compilers could use these to generate borderplate code, such as parameter checking. Eg instead of typing void MyFunction(string param1, int param2) { if(param1 null) throw new ArgumentNullException("param1"); if(param2 0) throw new ArgumentOutOfBoundsException("param2"); if(param2 99) throw new Arg... |
|
| A Wish..... (VIP replies) |
| microsoft.public.dotnet.framework.clr |
| Hi, I see that it's possible to apply attributes to function parameters. Wouldn't it be great if the compilers could use these to generate borderplate code, such as parameter checking. Eg instead of typing void MyFunction(string param1, int param2) { if(param1 null) throw new ArgumentNullException("param1"); if(param2 0) throw new ArgumentOutOfBoundsException("param2"); if(param2 99) throw new Arg... |
|
| ADO.NET DataReaders and the Middle Tier (VIP replies) |
| microsoft.public.dotnet.framework.aspnet |
| I'm trying to design all of my data access logic into one centralized assembly. I'm wondering how to implement DataReaders. There's plenty of documentation on passing DataSets to the client from the middle tier... but what about DataReaders? Do I have to bypass the centralized data access assembly when I want to use DataReaders? Thanks. |
|
| ASP >NET DATAGRID (VIP replies) |
| microsoft.public.dotnet.framework.windowsforms.controls |
| i have a datagrid with autoGenaratedCoulmn Property as true i want to hide one coulmn header i m using below listed code where i can seee the coulmn header but now how to change them code DataGrid dg new DataGrid(); dg.DataSource new DataTable();// (Run some query or whatnot here) dg.DataBind ArrayList AutoGeneratedColumns (ArrayList) GetPrivateField(dg,"autoGenColumnsArray") ; if (AutoGeneratedCo... |
|
| AsymmetricEncryptionKey (VIP replies) |
| microsoft.public.dotnet.framework.webservices.enhancements |
| I gave up on the SecureConversation since the WSE 2 did not want to call the cryptographic services without an error. Since I only need RSA (and not all certificates), I decided to try only using RSA with a custom binary security token. I have the security token on the server (through a security token manager) and can actually encrypt with the rsa based upon only the public key. However, the Encry... |
|
| Authentication against active directory (VIP replies) |
| microsoft.public.dotnet.framework.aspnet.security |
| Hello I am developing a ASP.NET site (using VB). I found some code that allows me to authenticate the user trying to access the site against the active directory server for the company. What is happening is some users authenticate and others do not ... but they are all a part of the domain. The web server the site is running on is part of the domain (else no user would authenticate) Here is the co... |
|
| Best Approach vs Any. (VIP replies) |
| microsoft.public.dotnet.framework.compactframework |
| I hate to be vague in my title, but to be honest I have started too many splash screen threads lately. I am still looking for an answer. Before I go on, I have to mention that I need a VB.Net solution. C# won't work for me, I have no java, C , or C# experience at all. My program takes a while ot load and the user has no way of knowing that anything at all is happening. I would like to make a splas... |
|
| BinaryWrite an Image from a binary string (VIP replies) |
| microsoft.public.dotnet.languages.csharp |
| I am trying to BinaryWrite an image from a binary string that I am storing in the web.config file. The image is just a 1x1 pixel gif. I am setting the content type to "image/gif", but the output is just my string. Any suggestions? Code is below: byte[] bytes Encoding.UTF8.GetBytes(ConfigurationSettings.AppSettings["PixelBinaryData"].ToString()); httpContext.Response.ContentType "image/gif"; httpCo... |
|
| Bitmap EXIF problem with Sony digicam JPEGs (VIP replies) |
| microsoft.public.dotnet.framework.drawing |
| Sorry if this post appears twice I posted from work about 5 hours ago and it still hasn't shown up, so I'll try again... Problem Using the System.Drawing.Bitmap object with a JPEG file created by a Sony DSC F717 digital camera causes Bitmap.PropertyItems to fail with " error: an exception of type: {System.ArgumentNullException} occurred " Example C# code: void Test() { Bitmap bmp new Bitmap( "DSC0... |
|
| BUG Compiler (VIP replies) |
| microsoft.public.dotnet.framework.clr |
| Hi, Repro: Make a call to the Cursor ctor like this.Cursor new Cursor(GetType(), "SomeCur.cur"); DO NOT have the following line in the program... using System.Reflection; Watch the Cursor ctro FAIL yet no compiler warning. Add the using System.Reflection; reference Build, again no compiler errror or warning (this time correctly) and call the Cursor ctor, it succeeds. Why no compiler warning or err... |
|
| BUG Compiler (VIP replies) |
| microsoft.public.dotnet.framework.windowsforms |
| Hi, Repro: Make a call to the Cursor ctor like this.Cursor new Cursor(GetType(), "SomeCur.cur"); DO NOT have the following line in the program... using System.Reflection; Watch the Cursor ctro FAIL yet no compiler warning. Add the using System.Reflection; reference Build, again no compiler errror or warning (this time correctly) and call the Cursor ctor, it succeeds. Why no compiler warning or err... |
|
| BUG Compiler (VIP replies) |
| microsoft.public.dotnet.framework.windowsforms.controls |
| Hi, Repro: Make a call to the Cursor ctor like this.Cursor new Cursor(GetType(), "SomeCur.cur"); DO NOT have the following line in the program... using System.Reflection; Watch the Cursor ctro FAIL yet no compiler warning. Add the using System.Reflection; reference Build, again no compiler errror or warning (this time correctly) and call the Cursor ctor, it succeeds. Why no compiler warning or err... |
|
| Building SqlParameters: Design Time or Runtime ? (VIP replies) |
| microsoft.public.dotnet.framework.adonet |
| I have never been a fan of building Input SqlParameters dynamically. I know ADO.NET does a pretty good job figuring out datatype and size. However, I like having the control and knowing I can affect the performance by building them myself. When I initially wrote our DAL, I built the SqlParameters dynamically because this is how my clients pretty much demand I do it in the past. It worked well exce... |
|
| c#A (VIP replies) |
| microsoft.public.dotnet.languages.vb.upgrade |
| Access Hotmail Using C# By Wouter van Vugt Introduction Hotmail is probably the most popular e mailing facility found on the web today. Millions of people around the world use it for everyday communication with friends and relatives. The main reason for it's popularity is the fact that you can use the service absolutely free of charge. Users are able to read their emails daily using a web interfac... |
|
| Calling from SoapClient to SoapService (VIP replies) |
| microsoft.public.dotnet.framework.webservices.enhancements |
| Hi, I am trying to call a method that has multiple parameters using the WSE 2.0 SoapClient. The method is declared as follows: public class Server : SoapService { [SoapMethod("Method1")] public string Method1(MyClass1 arg1, MyClass2 arguments) { ... } } Unfortunately, SoapClient.SendRequestResponse() only appears to take parameters for the name of the soap method and then a single object. How, the... |
|
| can I call from one constructor another constructor ? (VIP replies) |
| microsoft.public.dotnet.framework |
| public class A { public A () { // here I would like to call the second version of ctor, how to accomplish this ? } public A (int a, int b, int c) { // some code } } Thanks for any advice, Paul |
|
| cannot access file - EIF text file custom event sink (VIP replies) |
| microsoft.public.vsnet.enterprise.tools |
| I'm reposting this since I never got a response before.... I wrote a custom event sink to write to a text file. I am using a StreamWriter to do this. The problem is that as soon as the application starts, EIF (I assume) is holding onto this file. Any time I try to view the contents of the txt file I get the message: "The process cannot access the file because it is being used by another process". ... |
|
| Check for Nulls with Reflection? (VIP replies) |
| microsoft.public.dotnet.languages.csharp |
| I have severaloverloaded methods that take a multiple combinations of parameters, some which can't be null. I don't want to use try...finally logic all over the place to catch the nulls. I want to create some "catch all" functionality that I can add to every method that will sweep through all parameters and tell me if any are null. I think that is a good use for Reflection, but I am not sure how t... |
|
| compare 2 files (VIP replies) |
| microsoft.public.dotnet.languages.csharp |
| What is the best method for comparing 2 file? I want to create a utilities to syncronize 2 folders that perform function similiar to robocopy.exe Thanks, kids |
|
| Compare two instance of a class (VIP replies) |
| microsoft.public.dotnet.languages.csharp |
| Hi, I have a C# class and two instance of the class; the class have some property. I want to compare the property value of the two instance How should i do? override ? use delegate ? I am sorry ,my english was poor. |
|
| Concatenating arrays (VIP replies) |
| microsoft.public.dotnet.languages.csharp |
| What's the easiest way to concatenate arrays ? For example, I want a list of files that match one of 3 search patterns, so I need something like DirectoryInfo ld new DirectoryInfo(searchDir); pfiles ld.GetFiles("*.aspx.resx|") ld.GetFiles("*.ascx.resx") ld.GetFiles("*.master.resx"); but of course there is no operation allowed on the FileInfo[] arrays returned by the GetFiles method. Do I have to r... |
|
| Create an Icon from an Image safely (VIP replies) |
| microsoft.public.dotnet.framework.windowsforms |
| I am building a "smart client" WinForms executable that will be launched directly from a webpage. I do not want to require any client side installation, or .NET security policy configuration. I am trying to dynamically generate the image for a NotifyIcon. I could not find any way to get a Graphics object for an Icon, so I decided to create a Bitmap. I can create the Bitmap and generate the image: ... |
|
| cursor Resources elp (VIP replies) |
| microsoft.public.dotnet.framework.windowsforms.controls |
| Hi, I have a user control and i have added .cur cursor files to the project and trying to set .Cursor to new Cursor(gettype(), "cursorname.cur"); and I am getting An unhandled exception of type 'System.ArgumentNullException' occurred in system.windows.forms.dll Additional information: Value cannot be null. Any ideas? The .cur reference is matching case and the .cur is in the project. Thanks |
|
| Customizing Hashtable (VIP replies) |
| microsoft.public.dotnet.framework |
| Hi, I use a custom IHashCodeProvider with a Hashtable. What would your take be on the question what this should return to indicate "invalid" (as for null references) zero? Thanks, Phil |
|
| Datagrid columns using AutoGenerate via the autoGenColumnsArray private member array collection (reflection) (VIP replies) |
| microsoft.public.dotnet.languages.csharp |
| I have seen several people looking for a way to access the Columns collection when using the AutoGenerate true option. Some people have gotten so far as to find the private autoGenColumnsArray that has the information, but we as developers have no way to access this information. I have come up with a solution for the problem, (as I am sure many others have) using reflection. Here is some sample co... |
|