S
sasha
Hi!
Don't know if this forum read somebody from MS team. I suppose yes, so
propose new language future wich i need very much
I think it would be nice to have in C# something like macros, but more
powerfull. Here is example:
// code frame
public codeframe MyCodeFrame
{
initialization
{
DataBase db = new DataBase();
try
{
db.StartTransaction();
}
finalization
{
db.Commit();
}
catch
{
db.Rollback();
throw;
}
}
}
// use this code frame inside some method:
....
usecodeframe(MyCodeFrame)
{
ob.RunCommand("INSERT INTO ...");
...
}
....
As a result of compillation i want to se instead of
usecodeframe(MyCodeFrame)
clause:
....
DataBase db = new DataBase();
try
{
db.StartTransaction();
ob.RunCommand("INSERT INTO ...");
...
db.Commit();
}
catch
{
db.Rollback();
throw;
}
....
I think this can be usefull for many people... Maby someone from MS
team can propose MS to implement this future in C# 4.0
Don't know if this forum read somebody from MS team. I suppose yes, so
propose new language future wich i need very much

I think it would be nice to have in C# something like macros, but more
powerfull. Here is example:
// code frame
public codeframe MyCodeFrame
{
initialization
{
DataBase db = new DataBase();
try
{
db.StartTransaction();
}
finalization
{
db.Commit();
}
catch
{
db.Rollback();
throw;
}
}
}
// use this code frame inside some method:
....
usecodeframe(MyCodeFrame)
{
ob.RunCommand("INSERT INTO ...");
...
}
....
As a result of compillation i want to se instead of
usecodeframe(MyCodeFrame)
clause:
....
DataBase db = new DataBase();
try
{
db.StartTransaction();
ob.RunCommand("INSERT INTO ...");
...
db.Commit();
}
catch
{
db.Rollback();
throw;
}
....
I think this can be usefull for many people... Maby someone from MS
team can propose MS to implement this future in C# 4.0
