How do you declare inheritance from a more than one entity (a class and one or more interfaces) in VB.NET?
I can't get a handle on the syntax. Can anyone give me a simple demo? ...
I can't get a handle on the syntax. Can anyone give me a simple demo? ...
I am relatively new to programming, as you will soon see... I have 2 events, which execute the same code. I currently have the following pseudo code for a datagridview: private void dgv_CellEnter(object sender, DataGridViewCellEventArgs e) { string abc = "abc"; } private void dgv_CellClick(object sender, DataGridViewCellEventArgs ...
Hello. I am implementing a tracing mechanism myself. Now what I'd like to know is what is the best way to implement this mechanism(I mean, the architecture). First I thought of creating a class like this: class Tracer { public void NewEventRegistered(etc) {...} //this is the method I use to send this class the events I want to regis...
Hi, I have developed an application which imports data into Microsoft Excel. Am using VS2005 + .NET 2.0 and Microsoft Office 2007 is installed on my machine (Office 12). The compiled application works fine if I run it in my machine, but when I deploy the application to other machines say those using lower versions (Office 2000), I am g...
Let's say I have class PersonSummary, which combines properties (columns) from 2 database tables Person and Address (with a foreign key of Person), so a PersonSummary has a First Name, State and Zip. The creation of PersonSummary could be in a select clause with (person, address => new PersonSummary {person, address} ) My data access...
The Conditional Attribute in .NET allows you to disable the invocation of methods at compile time. I am looking for basically the same exact thing, but at run time. I feel like something like this should exist in AOP frameworks, but I don't know the name so I am having trouble figuring out if it is supported. So as an example I'd like t...
I want to lookup the default value of a column in my SQL2005 database. I only have the SQL server connection string, so I can only use the Sql library namespace (can't use the Oledb GetSchema stuff). I know there is a GetSchema()... but how do I use it to get a column schema, and thus the default value? I can't fillSchema on a datatab...
Hello, I'm looking for a function that will give me my real ip, not my local ip. the function i currently have, returns the ip in network and sharing center which is 192.168.2.100 But if I go to whatismyip, then it gives my real ip. How could I get this using vb .net? thanks ...
Hi there, I have an app that accesses a WCF service on a server which is hosted in a console app. I don't have a problem there, it's when I try access another service from the console app that's on yet another server that i have the problem. I'm using TCP to connect and i'm using all the default security values. So i'm going from A->B...
I would like to use reflection in .NET to get access to the object that invoked my method. I assume it is somehow possible to view up the stacktrace. I know it's not safe for a variety of reasons, but I just need to grab and catalog some property values. How do I do this? Update: I'm an idiot, I forgot to say this was in C# ...
Hello, My windows application using user control and one dll is loaded on 4 pc. One of the pcs pop up , "Attempted to read/write protected memory". Pls give me advise. Windows form is just used as back ground. User control is loaded on this win form and add one dll in the reference. ...
Below is some code that is used to pass around a reference to a method that contains strings as parameters, the purpose of this question is around using generics to negate the need to define the actual type! Impossible<ExampleSource, string>.Example(c => c.NonString); //does not work Impossible<ExampleSource, string>.Example<int>(c => c...
Hello. I am using Cecil to try to read my attributes properties: [AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)] public sealed class TraceMethodAttribute : Attribute { public TraceMethodAttribute() { MethodStart = true; MethodReturn = true; MethodMessages = true; } ...
Hello everyone, I am referring from VSTS2008 (C# console application, using .Net 3.5) by using Add Service Reference function to add reference to a WCF service hosted in IIS 7.0 in another machine in the same LAN. I find the client side app.config generated automatically is very strange. Here is the content, My confusion is the end poi...
Hello All, Iam using linq to entities and I want to get all Users that haven't signed up for the class. This is what I did. var classUsers = from cu in myEntities.ClassUsers where cu.Class.ClassId == classId select new { FirstName =...
I have a WCF Service which connect to Sql Server 2005 to retrieve and send data according to the method invoked. Currently I am using a hard coded sql connection string in .cs file to create a connection. Let me know what is the best way to use the connection string or where i place the connection string? Please help!! ...
I have started a new project in .NET which uses some old system's datababase in MySql. The data stored in mysql is periodicaly transfered to MS Sql on which our system works. I need to authenticate users with their login and password. User's passwords are stored as hash generated by OLD_PASSWORD function from mysql. Is there any way to ...
Hi there, I have a client app that calls a WCF service on a different server in the service I print out the following: 1. ServiceSecurityContext.Current.WindowsIdentity.Name; 2. WindowsIdentity.GetCurrent().Name; 1 above gives me my windows login and 2 gives me the windows login that the server is logged in as How can i change 2 so ...
I was reading about Key Containers in .NET as a secure a place to store a private key for asymmetric cryptography and digital signing. My question is how secure is the Key Container? because I've found out if I know the key container name, then i will be able to retrieve the private key using the following: // Create the CspParameters ...
Is there is a best practices way to store credentials in a .NET Windows application, be it be a built in API or just a recommend encryption algorithm? Along the same lines as Tortoise SVN, Spotify and Skype. Edit: My intention is to use a web service that returns a token from it's authentication service. The other services then accept ...