|
Hi Folks,
I want to insert 6 rows of data of Six week days into SQL Server 2008 database from a single C# windows form. I want to use a data grid view....... Please suggest how to logically achieve it....on single click of "Save" button in bindingnavigator i want to insert all 6 records in
Database. I am using Visual Studio 2008 SP1.... pls help
regards
shafi
|
|
|
|
|
hmmm pie
|
|
|
|
|
Hello Friends,
How can i change the size of an Array at runtime in C#.Net.
In VB.Net, i can do it using "ReDim" & "Preserve" keywords.
Is there anything similar in C#.Net, so we can change the size at runtime?
Thanks and Regards,
Nagendra.
|
|
|
|
|
|
Can we use MultiDimensional ArrayList?
|
|
|
|
|
I hope multidimensional arraylist can be done by, Each element of the ArrayList would then be another ArrayList.
ArrayList a = new ArrayList();
a.Add(new ArrayList());
|
|
|
|
|
ok thanks, i'll try this.
|
|
|
|
|
Hi,
In all .NET languages one-dimensional arrays can be resized, see the Array.Resize() method in the documentation. "This method allocates a new array with the specified size, copies elements from the old array to the new one, and then replaces the old array with the new one."
When you need to resize an array several times, or if you just don't know what size to choose at the start, you are probably better off choosing another kind of collection. The old ArrayList still exists, but it is better to use a generic list (that's List<T> ) which provides type checking and better performance. These collections grow and shrink dynamically without copying their content [ADDED] all the time (in the current implementation they grow by rounding up their capacity to the next power of 2 and copying only then).[/ADDED]
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
modified on Sunday, June 12, 2011 9:13 AM
|
|
|
|
|
Actually List<t> does copy all its elements when it needs to grow.
Go to System.Collections.Generic.List<t>.set_Capacity(int value) in for example Red Gate's .NET Reflector..
|
|
|
|
|
Right. I keep forgetting that. Back to the home-made linked lists then.
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
modified on Sunday, June 12, 2011 9:13 AM
|
|
|
|
|
i am developing a windows mobile C# application, how to save application settings? The user should be able to update these settings, but the settings want to be retrieved next time application starts. Do i need to use registry key? or xml config? any other good way to achevie this??
|
|
|
|
|
Try and save the data to a path such as:
Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
You can serialize your data in xml/binary format.
I prefer not to write to the registry, that is dirty.
Natza Mitzi
|
|
|
|
|
i will be gratefull, if u can giv me some sample codes to refer to...
|
|
|
|
|
|
Dear All, I am looking to change the date format of my computer same as changing it from control panel using c#.
any info please?
Abdul Rahaman Hamidy
Database Developer
Kabul, Afghanistan
|
|
|
|
|
http://msdn.microsoft.com/en-us/library/zdtaw1bw.aspx[^]
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
the article does not change the date setting as control panel.the article only changes date format to string in run time. what i want is to change the date format as i am changing from control panel.
this means i want to change computer date format from c# application and it should affect control panel too.
Abdul Rahaman Hamidy
Database Developer
Kabul, Afghanistan
|
|
|
|
|
There is 2 ways to change your system date time in .Net
1st by changing the culture of the running thread
CultureInfo culture = (CultureInfo)CultureInfo.CurrentCulture.Clone();
culture.DateTimeFormat.ShortDatePattern = "dd-MMM-yyyy";
culture.DateTimeFormat.LongTimePattern = "";
Thread.CurrentThread.CurrentCulture = culture;
2nd change the computer format
Structure SYSTEMTIME
Public wYear As Short
Public wMonth As Short
Public wDayOfWeek As Short
Public wDay As Short
Public wHour As Short
Public wMinute As Short
Public wSecond As Short
Public wMilliseconds As Short
End Structure
‘’’import the user32.dll (import the System.Runtime.InteropServices namespace):
'<DllImport("kernel32.dll", setLastError:=True)>
public shared function SetSystemTime(byref theDateTime as SYSTEMTIME) as Boolean
End Function
Dim newDateTime as SystemTime()newDateTime.wDay = valueHereif SetSystemTime(newDateTme) then 'cool, we set it successfullyend if
modified on Wednesday, November 18, 2009 5:32 AM
|
|
|
|
|
HI,
I have customer class. i want to create the wrapper class fot this?
how to create wrapmper class for the customer?
What is wrapper class?
|
|
|
|
|
|
Why would you want to add something, if you don't even know what the thing you want to add, actually is ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hi guys,
I am trying to make my setup project which is installing my program, install also the db schema I am using. I am using these technologies; vs2008 (c#) and sql server 2005.
I have already built a setup project and is installing the project, but without the db schema. Anyone can help me how to accomplish this please?
Thanks
dejmjin
|
|
|
|
|
You have to add a custom action to your installer.
Have a look here[^].
Calin
|
|
|
|
|
Thanks Calin...I will try this solutions. Seems good for my problem
Thanks again!
|
|
|
|
|
Hello,
I convert a pdf file to picture using Imagemagick and ghostscript,but the quality was blur, please help me to resolve this grat problem, thank you verry mutch.
|
|
|
|