-
- Strange behavior of typeof operator with respect to open constructed and unbound generic types
by Todd Stibor
- 3 Replies
- Last post
by nielsvanvliet
- Greetings all,
I ran across this interesting behavior that I am at a loss to explain, and therefore am very wary of implementing a fix until I understand why this is happening.
The set-up is that I have a factory class that will construct one of five AttributeEntry objects, depending on the type of the field in question. The entry point is such:
public AttributeEntry GetEntr
-
- Vista doesn't start .sln and .csproj-files
by Wuschba
- 14 Replies
- Last post
by BT Mike
- I just installed a Windows Vista and Visual Studio on it. Everyting seems to work fine except of that I'M not able to double-click on a .sln/.cs/.csproj-file to lunch VS: Just nothing is happening. What is wrong
-
- Class libraries
by Azurewrath
- 14 Replies
- Last post
by Azurewrath
- Hi all, Recently I managed to use something like this: My.Array ... methods without conflicting/removing the default one: Array ... methods Is this normal Because I was thinking this kind of thing is not doable. Thanks, Aw
-
- How to check if an instance was created alrady.
by IMBack
- 5 Replies
- Last post
by Mark Dawson
- Hi,
How to check if an instance was created already. Ex: If I create an instance and than i f I try to create another instance, it will check if it was created already than display an error message.
Thank you,
-
- Can't get custom build rules through automation
by Vadim G
- 1 Replies
- Last post
by mashu
- Hi,
I tried using automation for custom build rules. It looks like that only predefined rules (like MASM and lc) work fine.
For newly created tools automation model doesn't work properly. See comment in red in the source code sample below.
Is there a workaround for this issue
Thanks,
Vadim G
-
- Unions in C#
by nkumar85
- 2 Replies
- Last post
by Martin Xie - MSFT
- Hello
I want to have a union in my program. How do we do that. I need to replicate C++ union in C# as
union something
{
unsigned long Id;
unsigned char something:4;
unsigned char one_more:4;
char full_bytes[5];
};
How do I do this in C#
Can somebody help me
-
- Control Code Privileges Using System.Security.Policy Classes
by kered pople
- 2 Replies
- Last post
by kered pople
- Hi,
How do i create a new code group in c#.net code, that requires an assembly to be signed with a publisher certificate . Then verify that the .NET Framework correctly analyzes the evidence and places the assembly in the correct code group .
Thanks in advance
kered
-
- How to determine is there any data stored on the clipboard in C#?
by vincent90152900
- 4 Replies
- Last post
by vincent90152900
- How to determine is there any data stored on the clipboard in C# Many thanks for your replying.
-
- What's unsafe code?
by Azurewrath
- 2 Replies
- Last post
by Azurewrath
- Hi,
I read this on the net:
"You can define an unsafe context in C# using unsafe modifier. In unsafe context, you can write an unsafe code, example: C++ pointers etc."
But I am not sure what unsafe code is. Is it a code that is ignored by the garbage collerctor
Thanks,
aw
-
- Disabling screen saver for non-admins
by CLProgrammer2
- 5 Replies
- Last post
by H. Tony
- I wrote a program in C# that disables the screen saver for a certain amount of time by changing registry values. It works fine when ran by a machine admin but gets an permissions error if its ran by a normal user.
My first question is if I use the Windows API (SystemParametersInfo function, in user32.dll) would that be any differnt in allowing it to work for non-admin users
If not, i
-
- Web Service Partial Class
by CenGenTech
- 8 Replies
- Last post
by CenGenTech
- I just converted an application that communicates with the database via web services to VS2005. The conversion worked fine but I could not get the application to communicate with the web services. I kept getting a web method error. So, I decided to convert the web services to VS2005 as well. The conversion of the web services went well also. However, when I generate the proxy class through WSDL.ex
-
- What's this operator called?
by Azurewrath
- 8 Replies
- Last post
by Azurewrath
- Hi all, I am wondering what's the name of this operators <> in this context: List<int> integers = new List<int> ( ); [] is index operators, for arrays, collections, right Thanks, Aw
-
- Fail to Load dll from C# when no VS2005 installed
by Idit
- 4 Replies
- Last post
by Idit
- Hi, I am running C# application with a MFC dll on VS2005. When I copy the .exe file and the dll to another computer I get the following errer (both installed with .NET 2.0): An unhandled exception of type 'System.IO.FileNotFoundException' occurred in FilesUpdateApplication.exe
Additional information: Could not load file or assembly 'StrtData, Version=0.0.0.0, Culture=neutral, PublicKeyToken=nu
-
- How to create an event for a static property?
by Dawa Tsering
- 4 Replies
- Last post
by Dawa Tsering
- Hi all, I've got a static property as follows: private static int fieldAlbumCount = 0; public static int AlbumCount { get {return fieldAlbumCount;} set {fieldAlbumCount = value;} } What I would like to do is that whenever this property is set, I'd like to fire an event. How do I go about doing that TIA
-
- Creating strong name key in Vista
by Pepper Fleming
- 4 Replies
- Last post
by Pepper Fleming
- Hi,
Getting access denied trying to create a new strong name key using sn.exe in Vista. All solutions point to resetting permissions on the RSA\MachineKeys directory, but that isn't present in Vista.
Haven't found an answer yet, any help
Thanks,
Pepper
-
- Marshal.GetActiveObject() fails for windows services
by DragonWolfZ
- 3 Replies
- Last post
by Feng Chen - MSFT
- Hi all,
Sorry if this is in the wrong Forum section but I couldn't spot anything more suitable.
I am currently developing a windows service (not web service) that needs to interface with a legacy system via a COM object that is located in the ROT (Running Object Table) in memory. If I run my windows service as a Console Application, Marshal.GetActiveObject() returns the COM objec
-
- rdf
by two_man_only
- 5 Replies
- Last post
by two_man_only
- is there is anyone who knows anything about rdf in c#
-
- How to extract win32 native resource from a .net assembly ?
by Ram Kumar K
- 3 Replies
- Last post
by Ram Kumar Karnataka
- Hi, Can anyone please let me know how to programmatically extract win32 native resources(especially images) from a .net assembly Thanks, Best Regards,
-
- Reading Files from Directories Recursively
by Uday321
- 8 Replies
- Last post
by IsshouFuuraibou
- Hi All, I want to read the files(.txt & .doc) from a Folder, which may contain some Sub Folders and some files and those Sub Folders again contain some Sub-Sub Folders and Files(i.e., what ever may be the directory structure i need to read all the files from all the Folders and Sub Folders either in Depth First Search or Breadth First Search Manner...). am trying some thing like::
-
- Application design question - data downloads from internet
by Patrick Sears
- 4 Replies
- Last post
by theblueeyz
- Hi everyone, I have been wracking my brain over this and simply can't seem to think of the problem any other way. So I thought I'd look to see how other people would approach the problem. Basically, what I'm facing is this. My application is intended to provide a GUI-based way to view data that is displayed on websites. This involves screen-scraping - downloading web pages and then parsing them fo
-
- ConvertToDigit
by ppMalaysia
- 1 Replies
- Last post
by Paul Louth
- how can a multidigit number be converted to its string equivalent in words.e.g.,1324 to be converted to OneThreeTwoFour and OneThousandThreeHundredTwentyFour .Without using case or if-else statements,in least possible code.
-
- Tracing / Logging Method Calls.
by Saputz
- 2 Replies
- Last post
by Citizen on the earth
- Hello I need to be able to trace calls being made to a method in a asp.net environment. e.g. public static string doSomething( string txt){ } i want to log when the method above is being called with a list of a trace of the source of the call. So when the method above is called I want to have the following information. project\class1.cs:line 111
project\class2.cs:line 222
project\.cs:
-
- controling dynamicly created function objects?
by JoppeG
- 2 Replies
- Last post
by JoppeG
- Hi. I have a slight problem with my database software. The thing is I have written code for a function to add a new "Tab" with a "plane" and a "DataGrid" grid for viewing database info. This is how some of the function code looks, public void AddNewDefaultDataGridTab( DataSet dynamicDataSet, string dynamicTable, string TabTitle, string columnFileToLoad) { <code fo
-
- Member variables vs local variables?
by Cardin
- 5 Replies
- Last post
by decyclone
- I don't know where i got the idea from (maybe Actionscript), but i always had the nagging idea that for methods, using Member variables to store temporary data (for inbetween calculations) is more memory efficient than using Local variables. Here's some additional assumptions: The methods are accessed quite frequently, 50++ accesses per second (based on FPS). The class is to be inherited, so keepi
-
- Object reference not set to an instance of an object for an array
by hipswich
- 11 Replies
- Last post
by hipswich
- I have this error occurring under strange circumstances. I hope someone can help explain it.
The code is very simple and looks essentially like the following
//alData is an instance of ArrayList storing byte data
if (alData.Count > 0)
{
object [] ao = alData.ToArray();
alData.Clear();
try
{
foreach ( byte b in ao)
{
//some co