|
It doesn't "do" anything, it simply instructs the compiler where to look (in referenced DLL's or in .NET language, "assemblies"). They aren't evaluated during runtime at all, it's only used in the preprocessor during the linking phase of the compilation process.
Like the other poster said, if you don't use the "using" statement, you have to explicitly identify where to find certain functions in the included assemblies. It essentially just saves a lot of typing as stated.
Oddly enough, the "using" statement can also be used to re-assign namespaces and class names. You can use it to "alias" namespaces.
Another "using" keyword is to limit the scope of a variable and do automatic clean-up, like:
using (SolidBrush sb = new SolidBrush(Color.Red))
{
//Use the solid brush here
}
//Here the solid brush no longer exists, and the object is correctly disposed.
|
|
|
|
|
I need insert,delete and update data from SQL database in gridview.Please help me.Thanks
|
|
|
|
|
|
Permission granted! Please, proceed.
...or did you mean to ask a question in there somewhere??
|
|
|
|
|
<asp:FileUpload ID="FileUpload1" runat="server" />
<asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="Button" />
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;
public partial class we : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
DateTime creationTime = File.GetCreationTime(FileUpload1.FileName);
Label1.Text =creationTime.ToString() ;
}
}
shah k .j
|
|
|
|
|
I'm not going to split my effort over two identical questions. So pop back over to your original post and answer my latest response.
Alan.
|
|
|
|
|
I am interested in the most efficient way to store values from an object array containing dates, string, double, integer, Boolean, and null values. The values will then be restored back to the array by reading the file at a later date.
BinaryFormatter is very slow and inefficient and looking for another solution.
Need to stay in .NET Framework 3.5
Ken Eldridge
|
|
|
|
|
When I want to write out data quickly and efficiently I tend to implement the ISerializable interface directly on the classes I want to serialise and manage the writing out myself. The reason the BinaryFormatter is so slow is because it's using reflection to work out what to serialize. By specifying this yourself you save the formatter from having to do this which results in a much faster implementation.
|
|
|
|
|
Pete, are you available for paid consulting? If so how can I reach you to discuss project scope?
|
|
|
|
|
I need to pass an array from C#.net application to oracle stored procedure. Can anyone please let me know how to go about it? Also, which OracleType type do I use in C# when passing input parameter to stored procedure?
FYI, am using System.Data.Common.DbConnection in my C#.
|
|
|
|
|
Asking the same question again as you asked yesterday isn't going to get you an answer any faster. People answer the questions on a volunteer only basis, so it's rude to attempt to bump your post like this.
|
|
|
|
|
Did you try to pass it as XML, as suggested yesterday?
Bastard Programmer from Hell
|
|
|
|
|
Yes. I tried it by passing it as XML and works fine.
Thanks a lot.
|
|
|
|
|
I am using System.Data.Common.DbConnection.
How can i pass List<> to oracle stored procedure.
|
|
|
|
|
I haven't used Oracle in quite some time.. but I doubt that it'll know what to do with a List<>.
Pass it either as a table (if Oracle has a table-datatype for your param) or as XML in a single string.
Bastard Programmer from Hell
|
|
|
|
|
I am using System.Data.Common.Dbconnection to connect with my oracle database.
How can i pass List<> as a parameter to Oracle Stored procedure.
|
|
|
|
|
Hey guys,
Here are the complete results from a poll published by Pluralsight last week, asking their users which ORM tool for .NET they think is the best. Although the results are somewhat predictable, it's interesting to take a look at the picture.
Do you use any ORM tool and if so, which one do you prefer? What are the most important features of an Object-Relational Mapper for you?
modified 23-Apr-12 6:47am.
|
|
|
|
|
Hi,
I prefer Entity Framework despite the fact that I have used LINQ to SQL a lot. I prefer Entity because of it's advantages over LINQ. I prefer Microsoft based framework rather than third party frameworks.
Cheers
|
|
|
|
|
I like PetaPoco because it is simple and tweakable.
|
|
|
|
|
hello every body :
I need your help if you can
I want to to add information to reportViewer from a DataGrid.
thanks.
|
|
|
|
|
Hi,
Could you please describe more. I presume you want to send GridView's data to the ReportViewer?
|
|
|
|
|
hi all,
i have a an ActiveX object for the downloading my componet to the client machine.Its working fine as.html page,but my problem is when i placed it in to .aspx page its not working.
Please suggest me
|
|
|
|
|
Try the ASP.NET forum.
Binding 100,000 items to a list box can be just silly regardless of what pattern you are following. Jeremy Likness
|
|
|
|
|
|
Your question makes no sense at all. How do we know what your requirements are? How it will be used in your application? There is no "best", only what works for your requirements and skills.
Failure is not an option; it's the default selection.
|
|
|
|