using

Using Statement with Generics: using ISet<> = System.Collections.Generic.ISet<>

Since I am using two different generic collection namespaces (System.Collections.Generic and Iesi.Collections.Generic), I have conflicts. In other parts of the project, I am using both the nunit and mstest framework, but qualify that when I call Assert I want to use the nunit version by using Assert = NUnit.Framework.Assert; Which w...

Alias for class name in the method

Hello everyone I have some curly question.. I can define alias for the class at top of my document, Such as using MyName = Bla.Bla.ClassName But can I define something like this in the method? ...

Create a desktop widget framework using asp.net.

Hi, I like to create a desktop widget framework using asp.net. its like yahoo widget or google widget any one able to create a simple widget application and plug in to this framework.any one give me idea for this how to develop this framework? ...

Deny direct request using .htaccess

Is there any way to use .htaccess to deny direct Request to a specific part of my website e.g. www.example.com/XXXXX I only want to allow Referer only to XXXXXX. I know that I have to use HTTP_REFERER somehow to accomplish my goal but currently I am using other .htaccess rules and not sure how to combine all rules together. This is what...

Silverlight connectivity with database using ado.net

Hi All I want to connect my sql server 2005 database using ado.net in silverlight. I want to connect manually to my database. Please give me examples of populating gridview in silverlight manually. Thanks ...

ASP.net c#, how do I know what to use?

I keep coming accross code samples online for ASP.net c#, however they never seem to list which namespaces they include, for example: using System.Data.SqlClient; etc etc Am I missing something obvious or should I be expected to know exactly what namespaces each code example requires? ...

Weblogic remote debugging using eclipse

Hi Guys, My Weblogic is installed in a Red hat OS machine. In the startWebLogic.sh i have added this line JAVA_OPTIONS="-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8888,server=y,suspend=n %JAVA_OPTIONS%" When I try to connect from my Eclipse I get a "Failed to connect to remote VM. Connection refused. Connection refused: ...

VB.NET to C#: Imports/using

Is there a way to "Import" a static class in C# such as System.Math? I have included a comparison. Imports System.Math Module Module1 Sub Main() Dim x As Double = Cos(3.14) ''//This works End Sub End Module Vs using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Math; /...

"are you missing a using directive or an assembly reference?" but the namespace and reference are correct

Hi, I've got the following error when builing my project. The type or namespace name 'OvuMenu' could not be found (are you missing a using directive or an assembly reference?) But I have put a using in my code and a reference to the dll. It is a WPF application that exists of 3 projects. I checked the references, even intellisense wo...

does 'using' provide any advantages?

When you reference certain methods, you can either use using or explicitly type in the entire namespace. Are there any speed advantages of using one method over the other, or is it simply there to make typing out the entire namespace easier? thanks ...

PDF Fields Parser using PDFBox

Hi, From PDF, i need to read the co-ordinates of the fields such as, ascent descent of the fields, using PDFBox API. The COS dictioanary object contains those information i guess. As of now i can able to retrieve the rect box of the fields which includes x,y,height and width. But i need to get the baseline which in turn depends on ascen...

How to check Internet Connectivity on Windows Mobile Application using C#.net code

hi,while writing the code for checking connectivity of a device, i came accross System.Net.NetworkInformation but that didnt work as i am working on windows mobile 6.0 compact framework. then i used the 3.5 framework using using System.Net; using System.Web; using System.IO; and the code as follows from one of the blogs: private sta...

SQLite database file created from JDBC?

Hi everybody, I have created a SQLite database from Java. Now I want to know where it is stored physically on disk, so that I can use push that file on to Android. ...

.NET - Replacing nested using statements with single using statement

If you came across some C# code like this with nested using statements/resources: using (var response = (HttpWebResponse)request.GetResponse()) { using (var responseStream = response.GetResponseStream()) { using (var reader = new BinaryReader(responseStream)) { // do something with reader } ...

something like a using declaration for enums?

Basically this is what I'd like to do: struct A { enum E { X, Y, Z }; }; template <class T> struct B { using T::E; }; // basically "import" the A::E enum into B. std::cout << B<A>::X << std::endl; The reason why is that I want to basically inject the implementation details into my template class. At the same time...

Referring to Code in IBM.Data.DB2 makes that Assembly Unavailable to the rest of my Solution

I have a C# console application with three assemblies: Main, Common and Utilities. In a file in the Main assembly, Main.cs, I have the line: using Utilities; In a directory within the Common assembly, I have the DLL IBM.Data.DB2.dll. In the Utilities assembly, I have a source module which accesses said dll. Utilities has a Reference...

Confused using "using" Statement C#

According to MSDN Library using Statement (C# Reference) Defines a scope, outside of which an object or objects will be disposed. But I got this code posted here by some user and I got confused about this: (please see my comment on the code) using (OleDBConnection connection = new OleDBConnection(connectiongString)) { ...

Python equivalent to C#'s using statement

Possible Duplicate: What is the equivalent of the C# using block in IronPython? I'm writing some IronPython using some disposable .NET objects, and wondering whether there is a nice "pythonic" way of doing this. Currently I have a bunch of finally statements (and I suppose there should be checks for None in each of them too - ...